web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Error "Duplicate chat members is specified in the request body." How do i exclude a member in the flow?

(0) ShareShare
ReportReport
Posted on by 8

Hi,

I have seen that there are other threads about this, but I have not found anything that helps me with the problem I have. I have just started testing Power Automate and want to do this:

 

  • Fetch users who are in an "Office 365 group".
  • Create a chat.
  • Write a message in that chat.

I have received most of the help from the video by ChadVKeale on Youtube (https://www.youtube.com/watch?v=q7oOBCf0eB0), but that is for sending an email. The problem is that the user who sends the message to these members is also included in the group from which the members are fetched. This means that Power Automate tries to write to the same user twice.

 

What I need help with is finding a way to exclude a user that is fetched from the "Office 365 groups".

 

This is what I have so far:

Screenshot 2023-02-17 114721.png

 

@ChadVKealey 

I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,059 Moderator on at
    Re: Error "Duplicate chat members is specified in the request body." How do i exclude a member in the flow?

    After your Select, you can use the output of the Select in a Filter array with a filter where item() is not equal to the current users email address.

     

    grantjenkins_0-1676640441266.png

     

    grantjenkins_1-1676640499769.png


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • ChadVKealey Profile Picture
    1,393 on at
    Re: Error "Duplicate chat members is specified in the request body." How do i exclude a member in the flow?

    I've tested this and adding in a "Filter array" action to exclude the email that's creating the chat will do the trick. However, the way your flow is set up, it will create a new group chat each time it runs, which may not be exactly what you want. See this short video for how to set up that filter array action and a demonstration of the "multiple chats" issue you will run into once you get the flow working. 

  • StefanAhlqvist Profile Picture
    8 on at
    Re: Error "Duplicate chat members is specified in the request body." How do i exclude a member in the flow?

    Thank you both, I managed to make it work with "Filter Array". I'm very new to this, so right now, I have to rely on Google searches and your help.

     

    No, the intention is not to create a new group chat every time the message is sent out. It would be nice if it could incorporate this into the same chat. The idea from the beginning is to remind employees to submit their time for the previous month, as the finance department does not want to remind everyone individually.

     

    The alternative would have been to send this reminder via email, but I wanted to make it work through Teams chat.

  • ChadVKealey Profile Picture
    1,393 on at
    Re: Error "Duplicate chat members is specified in the request body." How do i exclude a member in the flow?

    What I would suggest is creating a table somewhere (SharePoint list would be my choice) that would store the name of the team/group and the ID of the group chat. You would need to first create those group chats to get the IDs. But, then your recurrence flow would iterate through that list to send a message to each group chat. Since group memberships can (and do) change, you'd need to also find a way to manage removing people from the group chat when they're removed from the group and add them when they're added. Bottom-line, doing this through a group chat can be done, but there are a lot of other details to consider. Honestly, sending users an email is going to be a cleaner option.

  • grantjenkins Profile Picture
    11,059 Moderator on at
    Re: Error "Duplicate chat members is specified in the request body." How do i exclude a member in the flow?

    If all the users are part of a Microsoft Team, then you could just post to the General Channel (or other) - assuming that's the group you're targeting. Otherwise, I would still likely go with email in this instance.

  • StefanAhlqvist Profile Picture
    8 on at
    Re: Error "Duplicate chat members is specified in the request body." How do i exclude a member in the flow?

    After thinking about this and talking to the boss, we will stick to an email. It feels too complicated to set up something more for such a small matter.

  • StefanAhlqvist Profile Picture
    8 on at
    Re: Error "Duplicate chat members is specified in the request body." How do i exclude a member in the flow?

    There was a thought that we would do it that way from the beginning, but the boss didn't want reminders in the chat. So now we had to do it via email instead.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard