React中的msal.js-Azure身份验证 [英] msal.js in React - Azure authentication

查看:40
本文介绍了React中的msal.js-Azure身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了错误,但是天蓝色的所有访问都可以.也许我的端点是错误的?你有什么主意吗?

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

错误APP_TEST需要访问权限才能访问组织中只有管理员才能授予的资源.请先向管理员授予此应用的权限,然后才能使用它.

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.

我用这个

示例

TenanId = 11111111ClientID = 22222222

TenanId = 11111111 ClientID = 22222222

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

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

推荐答案

您需要在AAD中打开应用程序 22222222 并授予添加的权限.看到此屏幕:

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

这篇关于React中的msal.js-Azure身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆