-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
When multiple accounts found user interaction for choosing correct account should be provided
Observed Behavior
When multiple live account logged in or when current service account does not match any live account you get error.
Steps to Reproduce
When you are logged in SharePoint where SFPX web part exists that connects to Azure services wither using AadHttpClient or MSGraphClient client and check it works fine. Then open in new browser tab Azure portal do sign-out and log in with different account and switch to SharePoint tab and refresh.
Or when multiple live accounts found you will get similar issue.
Following errors are not processed.
Error in case of multiple live accounts found:
AADSTS70002: Error validating credentials. AADSTS16000: Request is ambiguous: multiple user identities are available for the current request
Error in case of account mismatch
AADSTS50058: A silent sign-in request was sent but none of the currently signed in user(s) match the requested login hint
Proposed solution
Solution @microsoft/sp-http
// AdalAuthContext.js
67: AdalAuthContext.prototype._fetchAccessTokenSilent = function (resourceEndpoint) {`
.
.
73: if (_this._authContext._getItem(_this._authContext.CONSTANTS.STORAGE.ERROR) === 'interaction_required') {
Only one error is processed "interaction_required", but should process also when above mentioned errors are found.