graphAPI : Add azureAD group to enterprise app using grapAPI

Azad Patel 1 Reputation point
2021-08-11T17:44:38.95+00:00

Hi Team,

I would like to know if there is any GraphAPI for Adding azureAD group to enterprise app.

122754-image.png

If yes please share the documentation link.

Thanks,
Azad

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 46,406 Reputation points
    2021-08-12T03:01:07.763+00:00

    You should want to assign appRoles to users or groups. You can use the /appRoleAssignments endpoint to grant appRoles to groups.

    POST https://graph.microsoft.com/v1.0/groups/{id}/appRoleAssignments  
    Content-Type: application/json  
    Content-Length: 110  
      
    {  
      "principalId": "principalId-value",  
      "resourceId": "resourceId-value",  
      "appRoleId": "appRoleId-value"  
    }  
    

    principalId: your group id.

    resourceId: Object ID of the application.

    122478-image.png

    appRoleId: The id of the appRole you created.

    122527-image.png

    122556-image.png

    122485-269.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    2 people found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.