Which Version of MSAL are you using ?
Latest
Repro
// 1st call with regional auth set to true await cca.AcquireTokenForClient(scopes) .WithAzureRegion(true); // 2nd call to global await cca.AcquireTokenForClient(scopes) .WithAzureRegion(false);
Expected behavior
The 2nd call should go to global token endpoint.
Actual behavior
The 2nd call is going to regional token endpoint.
Possible Solution
This is happening because we are caching the network metadata with preferred network as the regional endpoint once the region is discovered for both the original authority and the authority created with the region.
Either cache the regional metadata separate, or cache it only for the regional authority.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4