msal.js in React - Azure authentication

早过忘川 提交于 2021-01-28 03:47:51

问题


I got error but all access in azure is ok. maybe my endpoint is wrong? Have you got any idea?

Error APP_TEST needs permission to access resources in your organization that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.

I use this

example

TenanId = 11111111 ClientID = 22222222

export const msalConfig = {
    authority: 'https://login.microsoftonline.com/11111111',
    clientId: '22222222',
    redirectUri: document.getElementById('root').baseURI
};

and

 msalAuth = new UserAgentApplication({
        auth: msalConfig,
      });

回答1:


You need to open up your application 22222222 in AAD and grant the permissions that were added. See this screen:



来源:https://stackoverflow.com/questions/62408077/msal-js-in-react-azure-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!