Unable to delete a teams channel message using graph api. error :- Failed-Delete Message: Initiator (8:orgid:**) is not allowed to delete message

john john Pter 1,570 Reputation points
2025-08-14T21:45:36.0166667+00:00

I am trying to delete a message inside Teams Channel, the chat was generated using copilot agent. now i used this action to do the delete:-

 image-20250814200129-1

and this endpoint:-

 

`POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete`

but we got this error message:-

 

AclCheckFailed-Delete Message: Initiator (8:orgid:68******3ca) is not allowed to delete message

 

Although the user who run the flow is teams owner + we have this setting enabled to allow owners to delete message:-

 image-20250814200422-2

 

any advice?

Thanks

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. atsmin 240 Reputation points
    2025-08-16T00:31:36.69+00:00

    Hi, john john Pter. To delete messages sent by members, team owners have to be allowed that via Messaging policy as below.

    User's image

    The "Owners can delete sent messages" is "Off" by default on Global policy. Therefore, to allow that operation to specific team owners, create a custom policy with the setting "On" and assign the policy to the owners.

    I have confirmed a team owner assigned the policy with "Owners can delete sent messages" is "On" can delete messages sent by members via Graph API as well. I hope this helps.

    Was 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.