【问题标题】:when i run appRoleAssignments, it returns the unclear response当我运行 appRoleAssignments 时,它返回不清楚的响应
【发布时间】:2017-08-17 18:27:08
【问题描述】:

我尝试将 appRole 分配给 servicePrincipal 并得到一些奇怪的响应: 网址是 https://graph.microsoft.com/beta/servicePrincipals/{id}/appRoleAssignments 与

{
  "principalDisplayName": "[displayName]",
  "principalId": "[Guid]",
  "principalType": "ServicePrincipal",
  "resourceDisplayName": "Microsoft.Azure.ActiveDirectory",
  "resourceId": "a774ef19-d0c7-4305-8317-8aa6a1f06634"
} 

这是回复

{
    "error": {
        "code": "BadRequest",
        "message": "Write requests are only supported on contained entities",
        "innerError": {
            "request-id": "2be2ae24-a9d9-4699-b72a-68f2feb12f8d",
            "date": "2017-08-17T18:10:07"
        }
    }
}

如果我将网址更改为 https://graph.microsoft.com/beta/appRoleAssignments 具有相同的请求正文,它返回

{
    "error": {
        "code": "Request_ResourceNotFound",
        "message": "Resource 'CBVUPR3WYk-2780vOjxKdw' does not exist or one of its queried reference-property objects are not present.",
        "innerError": {
            "request-id": "9b1aaae6-3178-4db3-8a2b-1a025d69bbda",
            "date": "2017-08-17T18:18:05"
        }
    }
}

对此有什么想法吗?

谢谢

【问题讨论】:

    标签: c# azure microsoft-graph-api office365api


    【解决方案1】:

    不幸的是,我认为目前这很糟糕。此 API 有一个主要错误 - 因为该 API 没有为您提供设置您尝试分配的 appRoleId 的方法。我没有关于何时修复此问题的 ETA。同时,AAD Graph API 是唯一可用的选项。

    希望这会有所帮助,

    【讨论】:

    • 谢谢 Dan,如果有的话请告诉我。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-12-04
    • 2016-12-05
    • 2018-05-12
    • 2015-11-30
    • 2014-04-20
    • 1970-01-01
    相关资源
    最近更新 更多