共用方式為


TenantProfile Class

Definition

Represents an account in a specific tenant. The same account can exist in its home tenant and also as a guest in multiple other tenants. Access tokens and Id Tokens are tenant specific and this object provides high level information about all the ID tokens associated with the account.

public class TenantProfile
type TenantProfile = class
Public Class TenantProfile
Inheritance
TenantProfile

Properties

ClaimsPrincipal

All the claims present in the ID Token associated with this profile.

IsHomeTenant

Returns true if this profile is associated with the user's home tenant.

Oid

The immutable identifier for an user account, in a specific tenant. This ID uniquely identifies the user across applications - two different applications signing in the same user will receive the same value in the oid claim. The user will have a different object ID in each tenant - they're considered different accounts, even though the user logs into each account with the same credentials.

TenantId

Represents the tenant that the user is signing in to. For work and school accounts, the GUID is the immutable tenant ID of the organization that the user is signing in to. For sign-ins to the personal Microsoft account tenant (services like Xbox, Teams for Life, or Outlook), the value is 9188040d-6c67-4c5b-b112-36a304b66dad.

Applies to