AuthenticationResult.UniqueId Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the Unique Id of the account in this TenantId
It is set as the oid (ObjectId) claim, or if that claim is null
, as the sub (Subject) claim which is guaranteed not-null.
public string UniqueId { get; }
member this.UniqueId : string
Public ReadOnly Property UniqueId As String
Property Value
Remarks
The oid claim identifies a user in all apps - Microsoft Identity Providers issue ID tokens with this claim, although it can be null in rare cases. The sub claim is "a locally unique and never reassigned identifier within the Issuer for the End-User" as per https://openid.net/specs/openid-connect-core-1_0.html and it is a mandatory claim with OIDC compliant issuers. Guest AAD accounts have different oid claim values in each tenant. Use Microsoft.Identity.Client.Account.HomeAccountId to uniquely identify users across tenants. See https://docs.microsoft.com/azure/active-directory/develop/id-tokens#payload-claims
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기