Find Security Identifier (SID) of User in Windows 11 Tutorial (2024)

Find Security Identifier (SID) of User in Windows 11 Tutorial (1)

This tutorial will show you how to find the security identifier (SID) of a specific user or all users on your Windows 10 and Windows 11 PC.

A security identifier (SID) is a string value of variable length that is used to uniquely identify a security principal or security group. Security principals can represent any entity that can be authenticated by the operating system, such as a user account, a computer account, or a thread or process that runs in the security context of a user or computer account.

Each account or group, or each process that runs in the security context of the account, has a unique SID that's issued by an authority, such as a Windows domain controller. The SID is stored in a security database. The system generates the SID that identifies a particular account or group at the time the account or group is created. When a SID has been used as the unique identifier for a user or group, it can never be used again to identify another user or group.

Each time a user signs in, the system creates an access token for that user. The access token contains the user's SID, user rights, and the SIDs for any groups the user belongs to. This token provides the security context for whatever actions the user performs on that computer.

Users refer to accounts by the account name, but the operating system internally refers to accounts and processes that run in the security context of the account by using their SIDs.

The operating system generates a SID that identifies a particular account or group at the time the account or group is created. The SID for a local account or group is generated by the Local Security Authority (LSA) on the computer, and it's stored with other account information in a secure area of the registry.

For every account and group, the SID is unique for the computer where it was created. No two accounts or groups on the computer ever share the same SID.

Reference:

Find Security Identifier (SID) of User in Windows 11 Tutorial (2)

Security identifiers

This article discusses security identifiers (SIDs) for Windows Server accounts and groups and unique identifiers.

learn.microsoft.com

Contents


  • Option One: Find SID of Current User using "WhoAmI" command
  • Option Two: Find SID of Current User using "wmic useraccount" command
  • Option Three: Find SID of Current User using "GetCurrent" PowerShell command
  • Option Four: Find SID of Specific User using "wmic useraccount" command
  • Option Five: Find User Name for SID using "wmic useraccount" command
  • Option Six: Find SID of All Users using "wmic useraccount" command
  • Option Seven: Find SID of All Users using "Get-WmiObject" PowerShell command
  • Option Eight: Find SID of All Users using "Get-LocalUser" PowerShell command
  • Option Nine: Find SID of Users in Registry Editor

EXAMPLE: Security Identifier (SID) with account association

Find Security Identifier (SID) of User in Windows 11 Tutorial (3)

Option One

Find SID of Current User using "WhoAmI" command


1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.

2 Copy and paste the command below into Windows Terminal, and press Enter. (see screenshot below)

whoami /user


Find Security Identifier (SID) of User in Windows 11 Tutorial (4)

Option Two

Find SID of Current User using "wmic useraccount" command


1 Open Windows Terminal, and select Command Prompt.

2 Copy and paste the command below into Windows Terminal, and press Enter. (see screenshot below)

wmic useraccount where name='%username%' get domain,name,sid


Find Security Identifier (SID) of User in Windows 11 Tutorial (5)

Add or Remove WMIC command Feature in Windows 11 Tutorial

This tutorial will show you how to add or remove the WMIC optional feature for all users in Windows 11. The WMI command-line (WMIC) utility provides a command-line interface for Windows Management Instrumentation (WMI). WMIC is compatible with existing shells and utility commands. The WMIC...

Find Security Identifier (SID) of User in Windows 11 Tutorial (6)www.elevenforum.com


Find Security Identifier (SID) of User in Windows 11 Tutorial (7)

Option Three

Find SID of Current User using "GetCurrent" PowerShell command


1 Open Windows Terminal, and select Windows PowerShell.

2 Copy and paste the command below you want to use into Windows Terminal, and press Enter. (see screenshots below)

(Outputs SID with username)​

[Security.Principal.WindowsIdentity]::GetCurrent() | Select-Object -Property @('Name', 'User')


OR​


(Outputs only SID)​

[System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value


Find Security Identifier (SID) of User in Windows 11 Tutorial (8)


Find Security Identifier (SID) of User in Windows 11 Tutorial (9)

Option Four

Find SID of Specific User using "wmic useraccount" command


1 Open Windows Terminal, and select Command Prompt.

2 Type the command below into Windows Terminal, and press Enter. (see screenshot below)

wmic useraccount where name='username' get sid


Find Security Identifier (SID) of User in Windows 11 Tutorial (10)

Add or Remove WMIC command Feature in Windows 11 Tutorial

This tutorial will show you how to add or remove the WMIC optional feature for all users in Windows 11. The WMI command-line (WMIC) utility provides a command-line interface for Windows Management Instrumentation (WMI). WMIC is compatible with existing shells and utility commands. The WMIC...

Find Security Identifier (SID) of User in Windows 11 Tutorial (11)www.elevenforum.com


Substitute username in the command above with the actual user name (ex: "Brink") of the account you want to know the SID for.

For example: wmic useraccount where name='Brink' get sid


Find Security Identifier (SID) of User in Windows 11 Tutorial (12)

Option Five

Find User Name for SID using "wmic useraccount" command


1 Open Windows Terminal, and select Command Prompt.

2 Type the command below into Windows Terminal, and press Enter. (see screenshot below)

wmic useraccount where sid='<sid>' get domain,name


Find Security Identifier (SID) of User in Windows 11 Tutorial (13)

Add or Remove WMIC command Feature in Windows 11 Tutorial

This tutorial will show you how to add or remove the WMIC optional feature for all users in Windows 11. The WMI command-line (WMIC) utility provides a command-line interface for Windows Management Instrumentation (WMI). WMIC is compatible with existing shells and utility commands. The WMIC...

Find Security Identifier (SID) of User in Windows 11 Tutorial (14)www.elevenforum.com


Substitute <sid> in the command above with the actual SID (ex: "S-1-5-21-1858701626-1738369404-427713822-1001") of the account you want to know the user name for.

For example: wmic useraccount where sid='S-1-5-21-1858701626-1738369404-427713822-1001' get domain,name


Find Security Identifier (SID) of User in Windows 11 Tutorial (15)

Option Six

Find SID of All Users using "wmic useraccount" command


1 Open Windows Terminal, and select either Windows PowerShell or Command Prompt.

2 Copy and paste the command below into Windows Terminal, and press Enter. (see screenshot below)

wmic useraccount get domain,name,sid


Find Security Identifier (SID) of User in Windows 11 Tutorial (16)

Add or Remove WMIC command Feature in Windows 11 Tutorial

This tutorial will show you how to add or remove the WMIC optional feature for all users in Windows 11. The WMI command-line (WMIC) utility provides a command-line interface for Windows Management Instrumentation (WMI). WMIC is compatible with existing shells and utility commands. The WMIC...

Find Security Identifier (SID) of User in Windows 11 Tutorial (17)www.elevenforum.com


Find Security Identifier (SID) of User in Windows 11 Tutorial (18)

Option Seven

Find SID of All Users using "Get-WmiObject" PowerShell command


1 Open Windows Terminal, and select Windows PowerShell.

2 Copy and paste the command below into Windows Terminal, and press Enter. (see screenshot below)

Get-WmiObject win32_useraccount | Select domain,name,sid


Find Security Identifier (SID) of User in Windows 11 Tutorial (19)

Option Eight

Find SID of All Users using "Get-LocalUser" PowerShell command


1 Open Windows Terminal, and select Windows PowerShell.

2 Copy and paste the command below into Windows Terminal, and press Enter. (see screenshot below)

Get-LocalUser | Select-Object -Property @('Name', 'SID')


Find Security Identifier (SID) of User in Windows 11 Tutorial (20)

Option Nine

Find SID of Users in Registry Editor


1 Open Registry Editor (regedit.exe).

2 Navigate to the key below in the left pane of Registry Editor. (see screenshot below)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList


3 Each subkey under the ProfileList key in the left pane represents a SID. Look at the ProfileImagePath value in the right pane for each SID subkey to identify the full path of an account's profile folder name.

For example, the S-1-5-21-1858701626-1738369404-427713822-1001 subkey is the SID for the user with the C:\Users\Brink profile folder path and Brink being the account name.


Find Security Identifier (SID) of User in Windows 11 Tutorial (21)

That's it,
Shawn Brink

Related Tutorials


  • View User Account Details in Windows 11
  • Get List of User Profiles and Account Names in Windows 11
  • Check Account is Administrator or Standard User in Windows 11
  • Check Account is Local Account or Microsoft Account in Windows 11
Find Security Identifier (SID) of User in Windows 11  Tutorial (2024)
Top Articles
Latest Posts
Article information

Author: Annamae Dooley

Last Updated:

Views: 5340

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Annamae Dooley

Birthday: 2001-07-26

Address: 9687 Tambra Meadow, Bradleyhaven, TN 53219

Phone: +9316045904039

Job: Future Coordinator

Hobby: Archery, Couponing, Poi, Kite flying, Knitting, Rappelling, Baseball

Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.