Difference between revisions of "How to get the AD object security ID (SID)"
From Tech-Wiki
Line 1: | Line 1: | ||
[[Category:Microsoft]] | [[Category:Microsoft]] | ||
− | How to obtain the Active Directory Security ID for an object. | + | How to obtain the Active Directory Security ID (SID) for an object. |
− | First | + | First obtain the distinguished name (DN) of the object. In this example the 'dsquery' utility has been used. |
From the Command Prompt. | From the Command Prompt. | ||
dsquery user -name "Joe Bloggs" | dsquery user -name "Joe Bloggs" | ||
Line 11: | Line 11: | ||
− | Next use the dsget utility, along with the DN to obtain the | + | Next use the 'dsget' utility, along with the DN to obtain the SID: |
dsget user "CN=Joe Blogs,OU=Users,DC=Contoso,DC=com" -sid | dsget user "CN=Joe Blogs,OU=Users,DC=Contoso,DC=com" -sid | ||
Revision as of 07:12, 12 May 2012
How to obtain the Active Directory Security ID (SID) for an object.
First obtain the distinguished name (DN) of the object. In this example the 'dsquery' utility has been used. From the Command Prompt.
dsquery user -name "Joe Bloggs"
Example Output:
"CN=Joe Blogs,OU=Users,DC=contoso,DC=com"
Next use the 'dsget' utility, along with the DN to obtain the SID:
dsget user "CN=Joe Blogs,OU=Users,DC=Contoso,DC=com" -sid
Example Output:
sid S-1-5-21-2560XXXX-XXXXX-XXXXX-19440 dsget succeeded