Unable to remove member or owner from the mail-enabled security group using graph API

KARAN KHETAN 26 Reputation points
2022-01-24T09:00:22.3+00:00

I am unable to Remove Member or Remove Owner from the mail-enabled security group using Graph API.
As per the MS Doc, I have verified all the necessary permissions are granted to AAD App.

Application Permissions granted are listed below
GroupMember.ReadWrite.All, Group.ReadWrite.All, Directory.ReadWrite.All

Please refer below ms doc snapshot and link
https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#methods

167737-microsoftteams-image-22.png

The error message am getting is:
Code: Request_BadRequest
Message: Cannot Update a mail-enabled security groups and or distribution list.

My suggestion would be to either it should work as per the documentation in MS or the MS Doc needs to updated to reflect what is possible?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,296 questions
0 comments No comments
{count} votes

Accepted answer
  1. JanardhanaVedham-MSFT 3,546 Reputation points
    2022-01-24T11:35:08.267+00:00

    Hi @KARAN KHETAN ,

    Managing mail-enabled security groups through Microsoft Graph is currently not possible as per this article. Yes, this a documentation issue and it should be corrected for Remove Member and Remove Owner methods in this group resource type page. Please note also that, earlier there was a GitHub issue raised on Add Member or Add Owner methods and eventually the documentation was corrected in same page for these methods.

    Today I have raised a Github case with the respective documentation team to correct it for Remove Member and Remove Owner methods as well and currently it has been assigned to one of the authors of this documentation for further review and correction. I will continue to monior this Github case for closure.

    167881-microsot-graph-api-mail-enabled-security-groups.jpg

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it ,so that it will be helpful to the other community users. If you have any further questions about this answer, please click "Comment".

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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