【问题标题】:Azure AD Graph API call gives "Insufficient privileges to complete the operation" exceptionAzure AD Graph API 调用提供“权限不足,无法完成操作”异常
【发布时间】:2016-06-22 06:45:28
【问题描述】:

我们正在尝试调用 Azure AD 图形 API 来获取用户信息。为此,我们遵循了https://github.com/OfficeDev/O365-ASPNETMVC-Start 中提到的步骤。但是当我们调用https://graph.windows.net/microsoft.onMicrosoft.com/users/?api-version=1.0 URL 并看到 fiddler 响应时,我们得到如下异常: HTTP/1.1 403 禁止 内容类型:application/json;odata=minimalmetadata

{
    "odata.error":
    {
        "code":"Authorization_RequestDenied","message":
        {
            "lang":"en","value":"Insufficient privileges to complete the operation."
        }
    }
}

我们尝试按照Insufficient privileges to complete the operation when using service principal to create Azure AD Application 中提到的步骤进行操作,但收到消息表明 appid 没有管理员权限来执行更改。请帮忙。

【问题讨论】:

    标签: azure


    【解决方案1】:

    如图所示,在您注册的机器人应用程序中更改权限以获取权限。

    还要检查 URL 中的“范围”参数。

    【讨论】: