Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
129 views
in Technique[技术] by (71.8m points)

MSAL.JS Vanilla JavaScript SPA sample - error when adding "extraScopesToConsent"

I have followed MS sample "MSAL.JS Vanilla JavaScript SPA" and it works fine until I extend it with extraScopesToConsent

const loginRequest = {
      scopes: ["openid", "profile", "User.Read"],
      extraScopesToConsent: ["https://graph.microsoft.com/.default"]
};

I receive this error message:
AADSTS70011: The provided request must include a 'scope' input parameter. The provided value for the input parameter 'scope' is not valid. The scope openid profile user.read https://graph.microsoft.com/.default is not valid. .default scope can't be combined with resource-specific scopes.

I have tried to upgrade to https://alcdn.msauth.net/browser/2.10.0/js/msal-browser.js but without any luck.
Anyone got this working??

question from:https://stackoverflow.com/questions/65942480/msal-js-vanilla-javascript-spa-sample-error-when-adding-extrascopestoconsent

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...