Udostępnij za pośrednictwem


IAccount Interface

Definition

The IAccount interface represents information about a single account. The same user can be present in different tenants, that is, a user can have multiple accounts. An IAccount is returned in the AuthenticationResult.Account property, and can be used as parameters of PublicClientApplication and ConfidentialClientApplication methods acquiring tokens such as AcquireTokenSilent(IEnumerable<String>, IAccount)

public interface IAccount
type IAccount = interface
Public Interface IAccount

Properties

Environment

Gets a string containing the identity provider for this account, e.g. login.microsoftonline.com.

HomeAccountId

AccountId of the home account for the user. This uniquely identifies the user across AAD tenants.

Username

Gets a string containing the displayable value in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com. This can be null.

Extension Methods

GetTenantProfiles(IAccount)

The same account can exist in its home tenant and also as a guest in multiple other tenants. TenantProfile is derived from the ID token for that tenant.

Applies to