microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

[BUG] Providers.globalProvider.getAllAccounts() returns an empty array even after the provider state is signed in

Open ARsquare opened this issue 2 years ago • 1 comments

Describe the bug Providers.globalProvider.getAllAccounts() returns an empty array even after the provider state is signed in. It sometimes gives an array containing the account of the logged in user. But very often gives an empty array.

To Reproduce Steps to reproduce the behavior: Use Msal2Provider/ TeamsMsal2Provider to log in the user. Once the provider state changes to signed in, call Providers.globalProvider.getAllAccounts() to get the account details.

Expected behavior It should return an array containing the account details of the logged in user.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: windows, macOS
  • Browser: edge, chrome
  • Framework: react
  • Context: Microsoft Teams
  • Version [e.g. 0.1]
  • Provider:
    • Msal2Provider { clientId: AADDetails.CLIENT_AAD_ID, scopes: [AADDetails.SERVICE_API_PERMISSION_NAME, AADDetails.GRAPH_USER_READ_PERMISSION_NAME], loginType: LoginType.Redirect, redirectUri: AADDetails.WEB_AUTH_REDIRECT_URI, };
    • TeamsMsal2Prover { clientId: AADDetails.CLIENT_AAD_ID, authPopupUrl: AADDetails.TEAMS_AUTH_POPUP_URI, scopes: [AADDetails.SERVICE_API_PERMISSION_NAME, AADDetails.GRAPH_USER_READ_PERMISSION_NAME], autoConsent: true, httpMethod: HttpMethod.POST, ssoUrl, };

Additional context Add any other context about the problem here.

ARsquare avatar May 11 '22 09:05 ARsquare

Hello ARsquare, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

ghost avatar May 11 '22 09:05 ghost

Hi @ARsquare is this still an issue for you and are you using the TeamxFX provider?

gavinbarron avatar Jul 20 '23 00:07 gavinbarron

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.