应用程序和用户的 AAD AppRoles allowedMemberTypes

AAD AppRoles allowedMemberTypes for both application and user

根据 Add app roles in your application and receive them in the token,我可以为用户、应用程序或两者创建 AppRole

如果我想定位用户,Manifest 上的 属性 allowedMemberTypes 应该是 User。对于应用程序,Application,但是两者呢?

两者的 allowedMemberTypes 是多少?

allowedMemberTypes是一个数组,所以你可以把“用户”和“应用程序”都放进去:

"appRoles": [
  {
    "allowedMemberTypes": [
      "User", "Application"
    ],
    "displayName": "Writer",
    "id": "d1c2ade8-98f8-45fd-aa4a-6d06b947c66f",
    "isEnabled": true,
    "description": "Writers Have the ability to create tasks.",
    "value": "Writer"
  }
],