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

Microsoft.Identity.Client.AccountId

public class AccountId
An identifier for an account in a specific tenant. Returned by HomeAccountId
public string Identifier { get; }

Unique identifier for the account

public string ObjectId { get; }

For Microsoft Entra ID, a string representation for a GUID which is the object ID of the user owning the account in the tenant

public string TenantId { get; }

For Microsoft Entra ID, a string representation for a GUID which is the ID of the tenant where the account resides.

public AccountId(string identifier, string objectId, string tenantId)

Constructor for an account ID.

public AccountId(string adfsIdentifier)

Constructor of an AccountId meant for Active Directory Federation Services (ADFS) scenarios since ADFS instances lack tenant IDs.