无法向应用授予管理员同意权 [英] Unable to grant admin consent to an app

查看:391
本文介绍了无法向应用授予管理员同意权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注本教程:  https://docs.microsoft.com/en-us/graph/auth-v2-service

I am following this tutorial: https://docs.microsoft.com/en-us/graph/auth-v2-service

我创建了一个应用于https://apps.dev.microsoft.com并授予某些应用权限。现在,我需要为这些权限授予管理员同意权,因此我转到了https://login.microsoftonline.com/common/adminconsent?client_id =< app_id>和
我收到此错误: 

I have created an app at https://apps.dev.microsoft.com and granted certain app permissions. Now I need to grant admin consent for those permissions, so I went to https://login.microsoftonline.com/common/adminconsent?client_id=<app_id> and I got this error: 

AADSTS500201:我们无法从此API版本为Microsoft帐户发出令牌。请联系应用程序供应商,因为他们需要使用协议版本2.0来支持此功能。

我做错了什么?

推荐答案

您好AndreylDev,

Hi AndreylDev,

根据错误  AADSTS500201:我们无法从此API版本为Microsoft帐户发出令牌。我认为权限未被正确授予。请尝试按照以下步骤操作:

As per the error AADSTS500201: We are unable to issue tokens from this API version for a Microsoft account. I believe the permissions are not granted properly. Please try to follow the below steps:

创建应用程序后,使用管理员帐户转到Azure门户登录,并授予如下权限。

After creating the app, go to Azure portal login with administrator account and grant the permission like below.

然后向以下端点发出请求:

GET https://login.microsoftonline.com/{tenant}/adminconsent?client_id=6731de76-14a6-49ae-97bc-6eba6914391e&st; state = 12345& redirect_uri = https:// localhost / myapp / permissions

And then make a request to the below endpoint:
GET https://login.microsoftonline.com/{tenant}/adminconsent?client_id=6731de76-14a6-49ae-97bc-6eba6914391e &state=12345 &redirect_uri=https://localhost/myapp/permissions

请确保你有正确的redirect_uri。如果您仍然看到相同的错误,请在重定向uri中添加http:// localhost并再次拨打电话以授予管理员同意权。

Please make sure you have correct redirect_uri. If you still see the same error, please add http://localhost in redirect uri and again make a call to grant the admin consent for the permission.

我希望这有帮助。

谢谢。


这篇关于无法向应用授予管理员同意权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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