开发者

How can I get the fully qualified domain name (FQDN) from a SharePoint user (SPUser object)?

开发者 https://www.devze.com 2023-02-08 06:04 出处:网络
Within SharePoint I have an instance of the SPUser class.The LoginName property is a string in the format domain\\user, but in this case the domain is the netbios domain name and not the fully qualifi

Within SharePoint I have an instance of the SPUser class. The LoginName property is a string in the format domain\user, but in this case the domain is the netbios domain name and not the fully qualified domain name (FQDN).

I need the FQDN. There is a SID available to me if that helps. Do I have to do some LDAP query to get this or is there some other way to figure this out?

In the end, I really want the u开发者_Python百科serPrincipalName (e.g., john.doe@corp.mycompany.com). The part after the "@" needs to be the FQDN as another system will be querying the UPN from AD and its value needs to match my value.


Looking at the SPUser and SPUtility class I think your only option is to get it from LDAP using username.

0

精彩评论

暂无评论...
验证码 换一张
取 消