azure - 为什么 "Application permissions"在 Azure AD 的 "Request API permissions"中被禁用?

标签 azure azure-active-directory azure-ad-b2b

我正在尝试授予控制台应用调用 Azure AD 中的 API 的权限。

当我转到“添加权限”时,“应用程序权限”显示为灰色,我只能选择“委派权限”。

我的理解是应用程序权限适合控制台应用程序,因为它在后端运行并且用户不登录它。

来自“应用程序权限”的帮助文本:

Your application runs as a background service or daemon without a signed-in user.

“委派权限”的帮助文本:

Your application needs to access the API as the signed-in user.

为什么“应用程序权限”被禁用?

Azure's "Request API permissions" dialog with a disabled "application permission" button

最佳答案

据我了解,您正在公开受 Azure AD 保护的自定义 api。如果是这样,您需要define the application permission通过编辑 api 应用程序的 list 。

enter image description here

list :

"appRoles": [
        {
            "allowedMemberTypes": [
                "Application"
            ],
            "description": "Apps that have this role have the ability to invoke my API",
            "displayName": "Can invoke my API",
            "id": "fc803414-3c61-4ebc-a5e5-cd1675c14bbb",
            "isEnabled": true,
            "lang": null,
            "origin": "Application",
            "value": "myTestRole"
        }
    ]

然后就会显示应用程序的权限。

enter image description here

关于azure - 为什么 "Application permissions"在 Azure AD 的 "Request API permissions"中被禁用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57379397/

相关文章:

windows - 启动Azure VM并自动登录Windows 10

Azure Active Directory 组增量 API

Azure、python 管理 Active Directory

Azure AD "Grant permission"按钮停止工作

c# - 该对象要么源自本地目录,要么正在进行迁移

powershell - AAD PowerShell v2 Add-MsolRoleMember 等效项

asp.net - 如何为 Windows Azure 网站实现 "Site under maintenance"?

azure - Azure Key Vault 中的 key 和 secret 有什么区别?

c# - Azure AD 允许匿名

azure - 由于服务连接错误而无法完成 - Azure AD