Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Delete message posted in teams channel by Flow

(2) ShareShare
ReportReport
Posted on by

I created a flow to post a message in my department’s team channel to notify us whenever a new file is added to the SharePoint folder. 

I added two files as a test and it worked but now I cannot delete those two test messages that were posted by Power Automate, nor can the owner of the channel.

 

How do we delete these messages?

  • Kisyo Profile Picture
    2 on at
    Re: Delete message posted in teams channel by Flow

    We created test messages with Flow and Global Admin permissions, and also couldn't delete them 😜  Admin account was the owner of the channel.

    You should TurnOn "Owners can delete sent messages" in Teams admin portal: go Messaging policies -> Global (Org-wide default) -> Owners can delete sent messages. Wait for about 15 minutes. 

    In the Teams web app the setting apllied faster. 

  • TomRBerg Profile Picture
    10 on at
    Re: Delete message posted in teams channel by Flow

    The team owner can delete posts by other users provided the Teams Messaging policy allows this. 

     

    This thread explains the steps required to enable this feature: https://powerusers.microsoft.com/t5/General/How-to-delete-a-message-created-by-Power-Automate-bot-flow-and/td-p/1828790 

    Requirements:

    • To enable the feature: Be a or be in communication with a Teams Admin or Global admin user.
    • To delete the messages in the team: Be team owner. Ensure the setting is enabled for the team under Teamname -> ... / Manage team -> Settings tab -> Member permissions
  • Adam_Cogniva Profile Picture
    2 on at
    Re: Delete message posted in teams channel by Flow

    Solution: Be a Global Admin... (maybe there's another option, but this worked for me). If you're not a global admin, it's time to make a new friend!

     

    I just encountered this issue as well and found this post. Thank you to the person posting the image showing it was actually possible! Armed with this knowledge I decided to take out the bluntest of instruments: Global Admin... I'm lucky enough to be a global admin, but of course I use a different account for my day-to-day. This is why I couldn't see the delete option.

     

    I just gave my non-global-admin-account global admin rights, refreshed Teams, and deleted the message. (Then I removed my global admin rights like a good little boy!)

     

    Anyway, when in doubt, Global Admin it out...

     

    Note: Teams Admin wouldn't cut it. The actual rights to delete someone elses post probably fall under Exchange or SharePoint.

  • fnanfne Profile Picture
    260 on at
    Re: Delete message posted in teams channel by Flow

    Oh interesting! I wish I can delete those! Good to know it is possible.

  • IF_Dubois Profile Picture
    12 on at
    Re: Delete message posted in teams channel by Flow

    Sorry, you are correct about the approval, but ALSO the second message can be deleted (as I have done that myself and my old colleague (who made the screenshot) is also able to do). I will get a new screenshot. As I mentioned in my earlier posts, I was able to just delete the Flow Bot messages in my old company.

     

    EDIT: new screenshot of second message / reply:

     

    Delete of second messageDelete of second message

  • fnanfne Profile Picture
    260 on at
    Re: Delete message posted in teams channel by Flow

    Your screenshot shows the deletion of a message that was posted by a flow. The step in the flow is posting a message "as the user" of the flow. This is the user able to delete the message in your screenshot. However, this user is still unable to delete the second message in your screenshot (with a date stamp of Yesterday 14:04) as this second message was "posted by" the Microsoft Flow bot. 

  • IF_Dubois Profile Picture
    12 on at
    Re: Delete message posted in teams channel by Flow

    As you can see in my screenshot below you should be able to delete messages posted by PA Flow Bot user (as the delete option is there - this was in my old company). So it should be just some authorization or setting.

  • fnanfne Profile Picture
    260 on at
    Re: Delete message posted in teams channel by Flow

    I believe you are only able to delete your own messages. After lots of testing, the channel was filled with nonsense. I then logged into Teams using the service account that is responsible for the flows creating these messages. We use a dedicated account called power.automate to do the flows and I logged in with this account to delete all the messages. There are still some I cannot delete, these were posted by Microsoft's flow bot and I'm unable to remove these.

  • IF_Dubois Profile Picture
    12 on at
    Re: Delete message posted in teams channel by Flow

    Somewhere it should be some setting as you can see below, my old colleague has the delete option for PA Bot messages.

     

    Delete optionDelete option

  • IF_Dubois Profile Picture
    12 on at
    Re: Delete message posted in teams channel by Flow

    Owners are able to delete their messages, it is only for the Flow Bot which it is unavailable. I have seen the feature request, but I find it strange as when I left my previous company (end of 2021) I was able to delete any Flow Bot created posts in channels. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,653 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow