Unable to delete team members via Graph

%3CLINGO-SUB%20id%3D%22lingo-sub-1512998%22%20slang%3D%22en-US%22%3EUnable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1512998%22%20slang%3D%22en-US%22%3E%3CP%3EA%20couple%20of%20weeks%20ago%20the%20delete%20group%20member%20method%20stopped%20working%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3EDELETE%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%7Bid%7D%2Fmembers%2F%7Bid%7D%2F%24ref%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%7Bid%7D%2Fmembers%2F%7Bid%7D%2F%24ref%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20deleted%20user%20is%20still%20able%20the%20to%20connect%20to%20the%20group%20via%20Teams%20(webapp%2C%20clientapp)%20and%20send%20messages%20to%20channels%2C%20etc.%20Only%20the%20related%20SharePoint%20site%20gets%20unavailable%20for%20the%20user.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EZsolt%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1512998%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraph%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1514001%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1514001%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F724110%22%20target%3D%22_blank%22%3E%40zskoroczki%3C%2FA%3E%26nbsp%3B-%20We%20could%20able%20to%20reproduce%20the%20issue%20on%20our%20side.%20Raised%20a%20bug%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1514035%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1514035%22%20slang%3D%22en-US%22%3EThank%20you!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1526032%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1526032%22%20slang%3D%22en-US%22%3EAny%20updates%20%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1537590%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1537590%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F720154%22%20target%3D%22_blank%22%3E%40DMarcolo%3C%2FA%3E%26nbsp%3B-%20we%20are%20tracking%20it%20internally%20we%20don't%20have%20ETA%20to%20share%20when%20it%20will%20be%20fixed%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1630597%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1630597%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F590590%22%20target%3D%22_blank%22%3E%40Nikitha-MSFT%3C%2FA%3E%26nbsp%3B%26nbsp%3BAny%20updates%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1843427%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1843427%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F724110%22%20target%3D%22_blank%22%3E%40zskoroczki%3C%2FA%3E%26nbsp%3B-%26nbsp%3B%3CSPAN%3EPlease%20use%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fteam-delete-members%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ERemove%20members%20from%20team%3C%2FA%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Bfor%20instant%20deletion.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984628%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984628%22%20slang%3D%22en-US%22%3EUnoftunatley%20I%20can%20not%20use%20beta%20version%20in%20my%20project.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984893%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984893%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F724110%22%20target%3D%22_blank%22%3E%40zskoroczki%3C%2FA%3E%26nbsp%3B%2C%20We%20are%20checking%20this%20with%20our%20engineering%20team%20for%20v1.0.%20You%20can%20also%20look%20at%20suggestion%20made%20by%20Wajeed%20if%20possible%20to%20use%20beta%20api%20in%20your%20project.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984930%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984930%22%20slang%3D%22en-US%22%3EWhen%20I%20tried%20to%20%5Bremove%20member%20from%20Team%5D(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fteam-delete-members%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%23http-request%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fteam-delete-members%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%23http-request%3C%2FA%3E)%20using%20Graph%20API%2C%20it%20works%20fine%2C%20Removing%20member%20from%20team%2FGroup%20in%20sync%20takes%20at%20least%2048%20hours%20so%20better%20to%20use%20remove%20member%20graph%20api%20using%20membership%20id%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985425%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985425%22%20slang%3D%22en-US%22%3EThank%20you%20for%20your%20response.%20Will%20that%20method%20remove%20the%20user%20from%20the%20M365%20group%20as%20well%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2005710%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2005710%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F724110%22%20target%3D%22_blank%22%3E%40zskoroczki%3C%2FA%3E%26nbsp%3B%2C%20Removing%20member%20from%20group%20is%20something%20different%2C%20You%20can%20use%20following%20API%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fgroup-delete-members%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eremove%20member%20from%20group%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2035442%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2035442%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3BIn%20that%20case%20we%20are%20going%20back%20to%20my%20original%20post.%20My%20goal%20is%20to%20remove%20a%20group%20member%20via%20graph%20in%20order%20to%20make%20the%20related%20resources%20(Teams%2C%20SharePoint%2C%20etc.)%20unavailable%20for%20the%20user.%20A%20couple%20of%20months%20ago%20the%20%22%3CSPAN%3EDELETE%20%2Fgroups%2F%7Bid%7D%2Fmembers%2F%7Bid%7D%2F%24ref%3C%2FSPAN%3E%22%20endpoint%20worked%20as%20expected%20but%20now%20the%20deleted%20users%20are%20still%20able%20to%20access%20the%20Team%20(but%20not%20the%20SharePoint)%20even%20weeks%20later.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2035699%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2035699%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F724110%22%20target%3D%22_blank%22%3E%40zskoroczki%3C%2FA%3E%26nbsp%3B-%20You%20can%20delete%20team%20members%20using%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fteam-delete-members%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ERemove%20member%20from%20team%3C%2FA%3E.%20Could%20you%20please%20try%20if%20that%20helps%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2035947%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20delete%20team%20members%20via%20Graph%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2035947%22%20slang%3D%22en-US%22%3EThank%20you%2C%20I%20will%20try%20it.%20So%20in%20that%20case%20I%20should%20call%20both%20endpoints%3F%3C%2FLINGO-BODY%3E
Occasional Contributor

A couple of weeks ago the delete group member method stopped working:

DELETE https://graph.microsoft.com/v1.0/groups/{id}/members/{id}/$ref

 

The deleted user is still able the to connect to the group via Teams (webapp, clientapp) and send messages to channels, etc. Only the related SharePoint site gets unavailable for the user.

 

Thank you,

Zsolt

14 Replies

@zskoroczki - We could able to reproduce the issue on our side. Raised a bug

 

Thank you!
Any updates ?

@DMarcolo - we are tracking it internally we don't have ETA to share when it will be fixed

 

@Nikitha-MSFT  Any updates?

@zskoroczki - Please use Remove members from team for instant deletion.

Unoftunatley I can not use beta version in my project.

@zskoroczki , We are checking this with our engineering team for v1.0. You can also look at suggestion made by Wajeed if possible to use beta api in your project.

When I tried to [remove member from Team](https://docs.microsoft.com/en-us/graph/api/team-delete-members?view=graph-rest-1.0&tabs=http#http-re...) using Graph API, it works fine, Removing member from team/Group in sync takes at least 48 hours so better to use remove member graph api using membership id
Thank you for your response. Will that method remove the user from the M365 group as well?

Thank you

@zskoroczki , Removing member from group is something different, You can use following API to remove member from group

@Trinetra-MSFT In that case we are going back to my original post. My goal is to remove a group member via graph in order to make the related resources (Teams, SharePoint, etc.) unavailable for the user. A couple of months ago the "DELETE /groups/{id}/members/{id}/$ref" endpoint worked as expected but now the deleted users are still able to access the Team (but not the SharePoint) even weeks later.

@zskoroczki - You can delete team members using Remove member from team. Could you please try if that helps?

Thank you, I will try it. So in that case I should call both endpoints?