gpt4 book ai didi

c# - 更新已使用自定义属性扩展的 AD UserPrincipal

转载 作者:太空宇宙 更新时间:2023-11-03 16:45:43 26 4
gpt4 key购买 nike

<分区>

我又被 AD 困住了。谁能给我指出一个示例,说明如何更新已使用 [DirectoryProperty("Title")] 样式属性扩展的 UserPrincipal (C#)?

我可以很好地创建用户,但是当我检索他时,他又是一个 UserPrincipal,而不是我的扩展类。我试过像这样构造我的扩展类

ADUserClassExtensions userExt = new ADUserClassExtensions(ctx, userOfInterest.SamAccountName, "******", true);

希望它能让我设置属性然后保存。但它(正确地)提示用户已经存在,因为我正在执行 Save() ,而且我在那里看不到 Update() 方法。

推荐的方法是什么?谷歌了一下,找不到任何东西。

非常感谢

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com