【问题标题】:How to configure permissions for the Azure AD authentication v2.0如何为 Azure AD 身份验证 v2.0 配置权限
【发布时间】:2016-05-22 18:19:44
【问题描述】:

我已经设置了一个新的网络应用程序,以便能够使用 Oauth2 V2 授权端点。我在https://apps.dev.microsoft.com/中定义了应用程序

如果我想获取新的授权令牌,请按照

中的说明进行操作

https://blogs.msdn.microsoft.com/richard_dizeregas_blog/2015/09/04/working-with-the-converged-azure-ad-v2-app-model/

我在登录页面收到以下错误:

抱歉,我们无法让您登录。 我们收到了错误的请求。

其他技术信息: 相关 ID:eb9c2331-32bd-45a9-90d1-e9105f0bfa87 时间戳:2016-05-22 18:10:48Z AADSTS70011:为输入参数“范围”提供的值无效。范围https://graph.microsoft.com/Calendar.Read 无效。

范围取自以下示例: https://github.com/Azure/azure-content/blob/master/articles/active-directory/active-directory-v2-scopes.md

所以我想这是一个有效的范围。

在 OAuth2 协议的 v1 中,在使用 API 之前,必须在我的租户的 Azure AD 中配置对 API 的访问。所以我尝试为新应用程序这样做。

尝试这样做,Azure 应用程序管理报告错误:

{ "message":"此请求的值无效。", "ErrorMessage":"此请求的值无效。", "httpStatusCode":"InternalServerError","operationTrackingId":null,"stackTrace":null,"Padding":null }

缺少什么才能使用新的授权端点?

【问题讨论】:

    标签: azure azure-active-directory adal azure-api-management azure-ad-graph-api


    【解决方案1】:

    如果声明 calendar.read,则文档包含拼写错误。必须是 calendars.read:

    私有静态字符串 [] 范围 = { "https://graph.microsoft.com/calendars.readwrite"};

    Uri authUri = await authContext.GetAuthorizationRequestUrlAsync(scopes, additionalScopes, clientId, redirectUri, UserIdentifier.AnyUser, null);

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-03-16
    • 2019-08-02
    • 1970-01-01
    • 2022-01-19
    • 1970-01-01
    • 1970-01-01
    • 2020-11-11
    • 2019-06-25
    相关资源
    最近更新 更多