Interface IAccount
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
- Extension Methods
Properties
Environment
Gets a string containing the identity provider for this account, e.g. login.microsoftonline.com
.
string Environment { get; }
Property Value
Remarks
This property replaces the IdentityProvider
property of IUser
in previous versions of MSAL.NET
except that IdentityProvider was a URL with information about the tenant (in addition to the cloud environment), whereas Environment is only the System.Uri.Host
HomeAccountId
AccountId of the home account for the user. This uniquely identifies the user across AAD tenants.
AccountId HomeAccountId { get; }
Property Value
Remarks
Can be null, for example if this account was migrated to MSAL.NET from ADAL.NET v3's token cache
Username
Gets a string containing the displayable value in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com
.
This can be null.
string Username { get; }
Property Value
Remarks
This property replaces the DisplayableId
property of IUser
in previous versions of MSAL.NET