Platform SDK: Access Control |
A SID value includes components that provide information about the SID structure and components that uniquely identify a trustee. A SID consists of the following components:
The combination of the identifier authority value and the subauthority values ensures that no two SIDs will be the same, even if two different SID-issuing authorities issue the same combination of RID values. Each SID-issuing authority issues a given RID only once.
SIDs are stored in binary format in a SID structure. To display a SID, you can call the ConvertSidToStringSid function to convert a binary SID to string format. To convert a SID string back to a valid, functional SID, call the ConvertStringSidToSid function.
These functions use the following standardized string notation for SIDs, which makes it simpler to visualize their components:
S-R-I-S-S...
In this notation, the literal character S identifies the series of digits as a SID, R is the revision level, I is the identifier-authority value, and S... is one or more subauthority values.
The following example uses this notation to display the well-known domain-relative SID of the local Administrators group:
S-1–5-32-544
In this example, the SID has the following components. The constants in parentheses are well-known identifier authority and RID values defined in WINNT.H.