Skip to main content

SYNOPSIS

Converts between Microsoft Entra ID SID and Object ID formats.

SYNTAX

DESCRIPTION

Automatically detects whether the input is a SID (S-1-12-1-…) or an Object ID (GUID) and converts it to the other format.
  • SID (S-1-12-1-…) → returns the corresponding Object ID (GUID)
  • Object ID (GUID) → returns the corresponding SID (S-1-12-1-…)

EXAMPLES

EXAMPLE 1

Converts the given SID to its corresponding Object ID (GUID).

EXAMPLE 2

Converts the given Object ID to its corresponding SID.

EXAMPLE 3

Converts multiple values via pipeline input.

PARAMETERS

-Value

The SID or Object ID to convert. Accepts pipeline input.
  • SID format: S-1-12-1-{4 decimal numbers separated by dashes}
  • Object ID format: GUID (e.g., xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Entra ID uses a specific SID format: S-1-12-1-{4 UInt32 components derived from the GUID bytes}. This conversion is bijective: SID <-> ObjectID. https://ps365.clidsys.com/docs/commands/Convert-EntraObjectIDAndSID