<PackageReference Include="Microsoft.Identity.Client" Version="4.84.2-preview" />

Microsoft.Identity.Client.Internal.IdToken

class IdToken

public string Email { get; }

public string FamilyName { get; }

public string GivenName { get; }

public string Name { get; }

public string ObjectId { get; }

The OID claim is a unique identifier (GUID) for the user object in Azure AD. Guest Users have different OID. This is a stable ID across all apps. IMPORTANT: There are rare cases where this is missing!

public string PreferredUsername { get; }

public string Subject { get; }

The sub claim is a unique identifier for user + app.

public string TenantId { get; }

public string Upn { get; }

public IdToken()

public static IdToken Parse(string idToken)

public string GetUniqueId()