I would like to get distinguish name "CN=XXX,CN=Users,DC=contoso,DC=com" I know there is a function "LookupAccountSid" that get only the name of the account for SID.
Is there any similar function that get the distinguish name? on c++
I would like to get distinguish name "CN=XXX,CN=Users,DC=contoso,DC=com" I know there is a function "LookupAccountSid" that get only the name of the account for SID.
Is there any similar function that get the distinguish name? on c++
If you want user account name associated with the caller thread, use GetUserNameEx
function with the NameFullyQualifiedDN
parameter. You could obtain additional information using IADsADSystemInfo
interface.
If you want to enumerate domain accounts, you could use ADSI interfaces.