Home > OS >  Which is a permanent ID?
Which is a permanent ID?

Time:03-08

Angular v12 using both Google and Azure Active Directory authentication.

After a successful login, Google's payload has a 21-digit sub, a permanent ID for the account. Looking at Azure's, which of the followings is the permanent ID?

  • uniqueId, a 36-char string
  • account.homeAccountId, value = uniqueId.<another 36-char>
  • account.localAccountId, value = uniqueId
  • idTokenClaims.sub, a 43-char string

This permanent ID should be unique among AAD including @outlook.com, @hotmail.com and etc. MSAL v2.1

CodePudding user response:

Thanks to @mxmissile, based on this MS Doc, .account.idTokenCalims.oid (same value as .uniqueId) should be the what I'm looking for.

  • Related