How can I search Active Directory by username using C#?

后端 未结 5 1775
名媛妹妹
名媛妹妹 2021-01-05 03:53

I\'m trying to search active directory by the username \'admin\'. I know for a fact that there is a user with that username in the directory, but the search keeps coming bac

5条回答
  •  孤城傲影
    2021-01-05 04:16

    It turns out that "userPrincipalName" needed to be all lower-case ("userprincipalname"). Good to know, thanks for your responses.

提交回复
热议问题