msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Remove-MgGroupConversation does not work

Open tldtech opened this issue 2 months ago • 3 comments

Describe the bug

I am trying to use the Remove-MgGroupConversation command to remove an email from a M365 group mailbox. I have the proper permissions, however I get the error "ConversationID isn't supported in the context of this operation."

Image

Expected behavior

Email should be deleted and a "HTTP/1.1 204 No Content" should be returned as stated here: https://learn.microsoft.com/en-us/graph/api/group-delete-conversation?view=graph-rest-1.0&tabs=http

How to reproduce

Execute the command with the "-groupid" and "-conversationid" switches.

SDK Version

2.30.0

Latest version known to work for scenario above?

N/A

Known Workarounds

N/A. Calling the graph API directly with a HTTP request or in the graph explorer generates the same reply.

Debug output

Remove-MgGroupConversation_Delete: ConversationId isn't supported in the context of this operation.

Status: 400 (BadRequest) ErrorCode: ErrorInvalidOperation Date:

Headers: Cache-Control : private Strict-Transport-Security : max-age=31536000 request-id : 717d975e-f807-4edb-8ca7-31d74a1e4fbe client-request-id : d79542b9-5680-4873-8be1-9a34cb9b72b1 x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Central US","Slice":"E","Ring":"4","ScaleUnit":"005","RoleInstance":"CH01EPF00077FDB"}} Date : Thu, 16 Oct 2025 13:41:37 GMT

Recommendation: See service error codes: https://learn.microsoft.com/graph/errors

Configuration

Name Value


PSVersion 7.5.2 PSEdition Core GitCommitId 7.5.2 OS Microsoft Windows 10.0.26100 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

Other information

No response

tldtech avatar Oct 16 '25 13:10 tldtech

Please submit the output when running using the -Debug parameter to better help us diagnose the issue

gavinbarron avatar Oct 20 '25 21:10 gavinbarron

Sure, here you go. I removed a bit of the Absolute Uri for confedentiality. `DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: DELETE

Absolute Uri: https://graph.microsoft.com/v1.0/groups/2e6........38/conversations/AAQk........Gvu8afzrxO8c%3D

Headers: FeatureFlag : 00000003 Cache-Control : no-store, no-cache User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26100; en-US),PowerShell/7.5.3 SdkVersion : graph-powershell/2.30.0 client-request-id : f8c01f03-0f14-408b-8778-2272f2d5e5a5 Accept-Encoding : gzip,deflate,br

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code: BadRequest

Headers: Cache-Control : private Strict-Transport-Security : max-age=31536000 request-id : 7da2d270-5dee-4e50-a744-7f1fa9eb991e client-request-id : f8c01f03-0f14-408b-8778-2272f2d5e5a5 x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Central US","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"CH01EPF00007314"}} Date : Tue, 21 Oct 2025 12:21:09 GMT

Body: { "error": { "code": "ErrorInvalidOperation", "message": "ConversationId isn't supported in the context of this operation." } }`

tldtech avatar Oct 21 '25 12:10 tldtech

The request looks valid in the way that it's composed, I've escalated this internally to the team that owns the underlying API.

gavinbarron avatar Oct 21 '25 15:10 gavinbarron