Forum Discussion

RuhanO35's avatar
RuhanO35
Copper Contributor
Jul 31, 2024

Guest user can not edit message

I have guest user that is not able to edit their own message on Teams throughout https://graph.microsoft.com/v1.0/chats/ API.

This user can post/delete/add reaction to messages, but when trying to edit the message we are getting this error:

{"error":{"code":"Forbidden","message":"AclCheckFailed","innerError":{"code":"60004","message":"AclCheckFailed-Edit Message: Initiator (8:orgid:31a8f324-20b3-4105-a528-c2e555f16dd4) is is not allowed to edit message","date":"2024-07-31T15:32:14","request-id":"3834c83a-fbee-4e3d-880b-d067374759c9","client-request-id":"3834c83a-fbee-4e3d-880b-d067374759c9"}}}

I used the exact same authentication token to create and edit the message, and this token has the right scopes granted:

ChannelMessage.ReadWrite ChannelMessage.Send Chat.ReadWrite Files.ReadWrite Team.ReadBasic.All User.Read

 

Is it possible that it could be caused by an specific setting for guest users? (eg: not alow guest user to edit message?) If so, where can I check this?
What other possible reasons can cause this? I couldn't found anything related to this error on Microsoft docs.

    • RuhanO35's avatar
      RuhanO35
      Copper Contributor

      Meghana-MSFT too give you more context. I noticed that there is a page https://admin.teams.microsoft.com/company-wide-settings/guest-configuration where we can edit guest & messages policy, and we allow disable it.
      My current setting it is like this:

       

      But that make things even more strange. Because I can notice that some guest users can edit DM messages and others not. Also, all guest are able to edit their messages on group chats (chat with +3 people).

      • Meghana-MSFT's avatar
        Meghana-MSFT
        Icon for Microsoft rankMicrosoft
        @ruhonO35 - So even though you have disabled the edit messages option to guest users, some guest users can still edit their DMs while some cannot, and all guests are able to edit their messages on group chats. Is the behavior same using Graph API and using Teams UI.

Resources