Forum Discussion
Getting GID or SID fom Active Directory
Hi lbendlin
Thank you for the quick reply.
I searched a little bit further in the tables and I'm quite sure the info I need is contained in the "ObjectSid" contained in the securityPrincipal table for each of the users in AD.
I wish I could both expand securityPrincipal to get the objectSID (easy) and make it "human readable" . Thats the point where I'm struck...
You're right on the point SID are not fully user related. Globally, the first part of the SID is linked to the domain, and it's the same for all users of that domain. But the last part of the SID is related to user. For me, having the whole SID or only the user related part "GID ? or RID?" is ok, as ally my users are on the same domain and I can have one with the other.
Were you able to find a resolution for this? I'm trying to do something similar but with the ObjectGUID value. I'm struggling to figure out how to get the value from being seen as Binary to the RfC 4122 GUID Format. Any help would be great!