You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TokenAcquistion.cs has hacks to try to guess guest scenarios. In the case of guest scenarios the home tenant ID, home object id is different from the tenantID, object ID which are provided in the IDToken. But we don't have today the home tid/oid information, and therefore we don't know that this is a guest user.
MSAL.NET uses the home tenant information, and therefore in the guest scenarios we don't find find the tokens in the cache today (I believe UniqueObjectIdentifier)
The hypothesis is that we'd want to call the User info endpoint not only for B2C, but also AAD, and get the home tenant ID, home iod, instead of the hack.
What ?
Like we do w/B2C, call the user_info endpoint for AAD guest scenarios. Today we test for B2C. We probably want to do the same or similar for AAD.
Why?
TokenAcquistion.cs has hacks to try to guess guest scenarios. In the case of guest scenarios the home tenant ID, home object id is different from the tenantID, object ID which are provided in the IDToken. But we don't have today the home tid/oid information, and therefore we don't know that this is a guest user.
MSAL.NET uses the home tenant information, and therefore in the guest scenarios we don't find find the tokens in the cache today (I believe UniqueObjectIdentifier)
microsoft-identity-web/src/Microsoft.Identity.Web/TokenAcquisition.cs
Lines 403 to 412 in 7293921
and
microsoft-identity-web/src/Microsoft.Identity.Web/TokenAcquisition.cs
Lines 297 to 308 in 7293921
The hypothesis is that we'd want to call the User info endpoint not only for B2C, but also AAD, and get the home tenant ID, home iod, instead of the hack.
What ?
Like we do w/B2C, call the user_info endpoint for AAD guest scenarios. Today we test for B2C. We probably want to do the same or similar for AAD.
microsoft-identity-web/src/Microsoft.Identity.Web/WebAppAuthenticationBuilderExtensions.cs
Lines 141 to 148 in dbb91d6
probably (to be checked) change the GetMsalId method to use the home tenant information?
microsoft-identity-web/src/Microsoft.Identity.Web/ClaimsPrincipalExtensions.cs
Line 19 in 2739123
How to test?
Otherwise we could add an hotmail account in a test tenant. Alternatively the identity lab will have guest accounts.
The text was updated successfully, but these errors were encountered: