Server is unwilling to process the request - Active Directory - Add User via C#

后端 未结 6 1583
陌清茗
陌清茗 2020-12-18 23:33

I used the example in this page to add a user to an Active Directory group, but I get an exception with the message \"Server is unwilling to process the request\" when execu

6条回答
  •  庸人自扰
    2020-12-18 23:52

    Just look out, because the start of the .properties("distinguished Name") can be different than the .properties("cn"). If the user is created with a , or ; in the .properties("cn"), the start of the .properties("distinguished Name") will be the username with \, or \;.

    This can give an error if u are trying to add a user you found by use of .properties("cn") to a Group.

提交回复
热议问题