WebDec 7, 2024 · This works fine for getting tokens. The problem is that when you call app.GetAccountsAsync(), MSAL needs to filter by the environment (public cloud, Fairfax, etc.) but it doesn’t have this information, so it uses the default (public cloud). Hence GetAccountsAsync() returns 0 accounts, because all your accounts are Fairfax. WebAug 12, 2024 · var accounts = await application.GetAccountsAsync(); returns an empty lists/IEnumerable. I would expect to retrieve an account from. application.GetAccountAsync(accountIdentifier) and a list from. await application.GetAccountsAsync();
MsalException when calling GetAccountsAsync with newer version ... - GitHub
WebGetAccountsAsync (String) Get the IAccount collection by its identifier among the accounts available in the token cache, based on the user flow. This is for Azure AD B2C scenarios. C# public System.Threading.Tasks.Task> … WebMay 31, 2024 · 2 Answers Sorted by: 1 You call GetAccountsAsync before AcquireTokenInteractive and it doesn't return any account. No account is passed to AcquireTokenSilent and this method doesn't know for which account should be access token acquired. You need to call GetAccountsAsync after you call AcquireTokenInteractive. new mom box
Clear the token cache (MSAL.NET) - Microsoft Entra
WebOct 28, 2024 · Tried it - GetAccountsAsync() delivers me an empty list :( - However, when I use "AcquireTokenInteractive(), then I get a list presented in the UI at rutime. I wonder how I can access this list programmatically? – askolotl. Nov 20, 2024 at 13:17. 1. WebJan 8, 2024 · Both GetAccountAsync and GetAccountsAsync do not return any account. Possible Solution No suggestions as it works for Xamarin iOS. The text was updated … WebFeb 3, 2024 · So I don't know if the GetAccountsAsync is returning null because the authority is wrong or not. – zawisza. Feb 5, 2024 at 11:40. @zawisza I have updated the net core sample do you want to try it out? The scope was wrong, so an access token was not returning. – Jenny. Feb 5, 2024 at 19:02 introduced birds in australia