c# - Get Full Qualified Domain Name from user AD entry -
c# - Get Full Qualified Domain Name from user AD entry -
this question has reply here:
determine domain of user in active directory search result [duplicate] 1 replygiven advertisement entry, how can total qualified domain name of user?
up used
((string)directoryentry.properties["userprincipalname"].value).split('@')[1]
but userprincipalname
not required property, guess need fallback...
i believe "cn" mandatory attribute in ad,and in experience has same value login value, can seek that. im not 100% sure though, seek , allow met know, if not delete answer.
hopefully helps.
c# active-directory
Comments
Post a Comment