Reputation: 299
I execute api call for retrieve it
Thats OK, i receive 3 groups and users inside But for now i need only groups that assigned to applications Like this
I cant find any methods in graph api for filter it . If somebody know how to do it , help please
Upvotes: 0
Views: 1441
Reputation: 111
To get the groups assigned to an application (Service Principal)
Microsoft Graph API:
https://graph.microsoft.com/v1.0/servicePrincipals/<servicePrincipal_id/appRoleAssignedTo
Microsoft Graph powershell:
Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $servicePrincipalId
Upvotes: 0
Reputation: 299
Resolve this problem in such way:
Response :
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#appRoleAssignments",
"value": [
{
"id": "tV-E7eUeFkmIemkoWcUgTkrT54btaddPtiLX96wVx0g",
"creationTimestamp": "2018-07-06T10:43:32.548348Z",
"principalDisplayName": "Pasha Kostohrys",
"principalId": "${userID}",
"principalType": "User",
"resourceDisplayName": "azure-group-sync",
"resourceId": "${applicationId}"
},
{
"id": "ZRCxfjNVlUqrjp9Y3wuLJz6beU58dtNOvr41VsKwADo",
"creationTimestamp": null,
"principalDisplayName": "ops",
"principalId": "${groupID}",
"principalType": "Group",
"resourceDisplayName": "azure-group-sync",
"resourceId": "${applicationId}"
}
] }
Upvotes: 1