.netactive-directoryldapaccount-management

What is "Name" in "IdentityType" (System.DirectoryServices.AccountManagement)


I want to search a user with "Display Name". I come across FindByIdentity function and it can search with below IdentityTypes:

DistinguishedName 3 The identity is a Distinguished Name (DN).

Guid 5 The identity is a Globally Unique Identifier (GUID).

Name 1 The identity is a name.

SamAccountName 0 The identity is a Security Account Manager (SAM) name.

Sid 4 The identity is a Security Identifier (SID) in Security Descriptor Definition Language (SDDL) format.

UserPrincipalName 2 The identity is a User Principal Name (UPN).

(refer: https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.accountmanagement.identitytype?view=netframework-4.7.2)

May I have your advice what is "Name" here?


Solution

  • The Name field corresponds to the CN value (Common Name) for the object, which is unique within the domain.