2017-08-17 57 views
0

我試圖appRole分配給servicePrincipal並得到了一些奇怪的反應: URL是 https://graph.microsoft.com/beta/servicePrincipals/(編號)/ appRoleAssignments 與當我運行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" 
     } 
    } 
} 

,如果我改變的URL 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" 
     } 
    } 
} 

對此有何想法?

謝謝

回答

0

不幸的是我認爲這是目前非常破碎。這個API有一個主要的缺陷 - 因爲這個API沒有提供給你設置appRoleId的方法。當這個問題得到解決時,我沒有ETA。與此同時,AAD Graph API是唯一可用的選項。

希望這會有所幫助,

+0

感謝丹,請讓我知道它是否可用。 –

相關問題