principal_from_sid

Use the principal_from_sid command look up the security principal for a specified security identifier (SID) in Active Directory. If the security identifier is found, the command returns the Active Directory name of the principal.

Zone type

Not applicable

Syntax

principal_from_sid [-upn] sid

Abbreviation

pfs

Options

This command takes the following option:

Option Description

-upn

Returns the user names in user principal name (UPN) format, not the default sAMAccount@domain format.

Arguments

This command takes the following argument:

Argument Type Description

sid

string

Required. Specifies the security identifier of an Active Directory security principal.

Return value

This command returns the Active Directory name of the principal if it finds a principal. If it does not find a principal, it returns a message stating so.

Examples

principal_from_sid S-1-5-21-2076040321-3326545908-468068287-1159

This example returns the principal name: oracle_machines@acme.com

Related commands

The following commands perform actions related to this command:

  • principal_to_dn searches Active Directory for a user principal name (UPN) and, if found, returns the corresponding distinguished name (DN).
  • dn_to_principal searches Active Directory for a distinguished name (DN) and, if found, returns the corresponding user principal name (UPN).