【发布时间】: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