In both MSAL .NET and MSAL Java, the cache key for access tokens contains the tenant. For .NET this tenant value is a constant "managed_identity" for MSI scenarios, however in Java we had a default authority value which we extracted the tenant from, which meant it was always "common" instead of "managed_identity"
The changes in this PR add a new 'tenant' field to Public/Confidential/ManagedIdentity apps, which is then used in the token cache instead of parsing the authority. This will allow the cache keys in Java to better match those in .NET, and hopefully be more clear about where the tenant in a cache key came from.
(tests covering both the old and new cases will be coming soon)
Addresses https://github.com/AzureAD/microsoft-authentication-library-for-java/issues/710
In both MSAL .NET and MSAL Java, the cache key for access tokens contains the tenant. For .NET this tenant value is a constant "managed_identity" for MSI scenarios, however in Java we had a default authority value which we extracted the tenant from, which meant it was always "common" instead of "managed_identity"
The changes in this PR add a new 'tenant' field to Public/Confidential/ManagedIdentity apps, which is then used in the token cache instead of parsing the authority. This will allow the cache keys in Java to better match those in .NET, and hopefully be more clear about where the tenant in a cache key came from.
(tests covering both the old and new cases will be coming soon)