AadTokenProvider or MSGraphClient not working when logged with multiple live accounts and principal one is a guest/external user
Category
- [ ] Question
- [ ] Typo
- [x] Bug
- [ ] Additional article idea
Expected or Desired Behavior
Correct account should be chosen whan logged in with multiple accounts.
Observed Behavior
When you're logged in with multiple accounts, the current one in SharePoint being a guest account, and you try to fetch token with AadTokenProvider or connect with MSGraphClient, you get an error.
Steps to Reproduce
- Log in with multiple accounts at the same time on your browser (happens when you use Azure portal for exemple)
- Ensure that the account actually used in SharePoint is a guest one.
- Use either AadTokenProvider or MSGraphClient in a SPFx webparts or extension.
- Below error is thrown:
"AADSTS16000: Either multiple user identities are available for the current request or selected account is not supported for the scenario.
Related issue: #2629 & #3879
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
The original issue was submitted 1 year ago and fixed the problem for tenant user account.
The second one, submitted in may, reffered to the same problem and seemed to be fixed for some time.
Any idea on when guest users will be able to use our developments while logged in with multiple accounts ?
The Azure AD team got back to us with a solution. The fix has been checked in and will start rolling out shortly. I will check in a couple weeks to see if you're still seeing issues regarding guest users.
Thanks
@FlorianLabranche are you still seeing issues? I believe this problem should now be resolved.
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.
Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues