Error on Password Change Of Active Directory User

前端 未结 2 1671
甜味超标
甜味超标 2021-01-17 01:37

Hi I am trying to reset password of Active Directory User But I Am getting error,Following is my Code:

    public string ChangePassword(string Identity,strin         


        
2条回答
  •  不思量自难忘°
    2021-01-17 02:08

    Few things:

    • You should not be setting a username, password, or AuthN type on UserEntry.
    • your success = UserEntry.Username... should be obj foo = UserEntry.NativeObject;. If that passes, you have a valid DE.
    • You don't need to call CommitChanges() here.
    • You would call ChangePassword in the context of the user, not the administrator. That will pass through the GetDirectoryEntry() call properly.

提交回复
热议问题