Permissions to add member to group via Graph API

后端 未结 1 470
野性不改
野性不改 2021-01-22 16:27

I am trying to add a member via this MS Graph API: https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http but am running into permission

相关标签:
1条回答
  • 2021-01-22 16:53

    Yes you also need GroupMember.ReadWrite.All and Directory.ReadWrite.All Application permission.

    PostMan Request URL:

    https://graph.microsoft.com/v1.0/groups/93d96b98-YourGroupId_3ede399/members/$ref

    PostMan Request Body:

    {
     "@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/b33ce735_YourUserId_15337c469076"
    }
    

    Postman Test:

    Added On Group:

    Note: Make sure after adding permission you have accepted grant admin consent.

    Please refer to Official Document

    0 讨论(0)
提交回复
热议问题