A sample showcasing how to develop a web application that handles sign on via the unified Azure AD and MSA endpoint, so that users can sign in using both their work/school account or Microsoft account. The sample also shows how to use MSAL to obtain a token for invoking the Microsoft Graph, as well as incrementental consent.
Fixes the problem await app.GetAccountAsync(ClaimsPrincipal.Current.GetAccountId()); always returns null,
What happened?
The service provider was re-created each time we called BuildConfidentialClientApplication(), and therefore there were as many InMemoryCache as apps created, whereas the InMemoryCache should be one service for the application
Fixes the problem
await app.GetAccountAsync(ClaimsPrincipal.Current.GetAccountId());
always returns null,What happened? The service provider was re-created each time we called BuildConfidentialClientApplication(), and therefore there were as many InMemoryCache as apps created, whereas the InMemoryCache should be one service for the application
This PR makes sure the service provider is a singleton. I also updated https://github.com/AzureAD/microsoft-identity-web/wiki/asp-net