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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Add members to private...
Power Automate
Answered

Add members to private channel from power automate

(1) ShareShare
ReportReport
Posted on by 10

Hi All,

 

Is there a way we can add members to private channel from power automate (when a username is added to a SharePoint list).

I could find a way to call Graph Api to create a private channel and add user at once. but how to add users after creating a channel?

 

I wonder if below code is for this purpose?

Add conversationMember - Microsoft Graph v1.0 | Microsoft Docs

 

I tried but getting timeout and this message "Failed to execute request."

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,451 Most Valuable Professional on at

    Hi @BinuThomas,

     

    I would use the Add member to channel method:

    https://docs.microsoft.com/en-us/graph/api/channel-post-members?view=graph-rest-1.0&tabs=http

     

    When the user is already part of the team you can use a HTTP action setup like below:

    addexistingteammembertoprivatechannel.png

  • BinuThomas Profile Picture
    10 on at

    I tried this one without header, it timed out on testing and got the message "Failed to execute request". I will try with header.

  • BinuThomas Profile Picture
    10 on at

    Hi @Expiscornovus 

    This worked. Thank you for the help.

  • digi365 Profile Picture
    20 on at

    Hi,

     

    firstly, thanks for the great solution - it´s working almost 😉

     

    I´d like to add, that I had to add a few more permissions in AAD in regards to Lee´s article.

    digi365_0-1649425261652.png

     

    Now I have the following - and hopefully last - issue:

    digi365_1-1649425316708.png

    "Operation not supported for this Channel"

     

    Any idea what has to be done here?

     

  • digi365 Profile Picture
    20 on at

    Nevermind - I used a wrong ID for the actions (ID of public channel, not private)

  • NickRt Profile Picture
    8 on at

    Hi guys, 

    How would this look like if you want to use this method to add a member to a shared channel?
    You don't want/need to add the user to the team 

  • Community Power Platform Member Profile Picture
    on at

    Hi! I know your solution uses the HTTP action, but I was running into an issue with authentication. I'm using Invoke an HTTP request (HTTP with Azure AD) to try and get around that. It SEEMS to be working, but I'm getting a 400 error. 

     

    {
     "host": {
     "connectionReferenceName": "shared_webcontents",
     "operationId": "InvokeHttp"
     },
     "parameters": {
     "request/method": "POST",
     "request/url": "https://graph.microsoft.com/v1.0/teams/40000000-2000-4000-a00-b000000000/channels/19%3A600000000000000000000000000050%40thread.tacv2/members",
     "request/headers": {
     "Content-type": "application/json"
     },
     "request/body": "{\"@odata.type\": \"#microsoft.graph.aadUserConversationMember\",\n\"roles\": [],\n\"user@odata.bind\": \"https://graph.microsoft.com/v1.0/users('40000000-8008-4000-8000-90000000000')\"}"
     }
    }

     

    That is the sanitized raw input from the flow. I can run it successfully from the Graph Explorer so I'm stuck on why it's not working in PowerAutomate. Any ideas?

  • wind0soft Profile Picture
    38 on at

    Hi @Anonymous   I'm running into a similar issue with the HTTP with Azure AD connector in power automate.  I can create the private channel but I can't change or add a owner.  See here for more information: https://powerusers.microsoft.com/t5/General-Power-Automate/Add-user-to-Microsoft-Teams-Channel-private-using-Microsoft-Flow/m-p/2414335/emcs_t/S2h8ZW1haWx8bWVudGlvbl9zdWJzY3JpcHRpb258TE80MEgzUzNGVVNETUV8MjQxNDMzNXxBVF9NRU5USU9OU3xoSw#M144047

     

    I think it's with the connector but I'm not sure.  Thanks in advance

  • wind0soft Profile Picture
    38 on at

    Hi all, just a FYI my flow was corrupt and that's what was causing my problem.  

  • Frac Profile Picture
    194 on at

    @Expiscornovus 

    I'm trying to use your example to add members to a private teams channel i made, but i am getting a forbidden error.  do i have the HTTP instructions set up correctly?  should my channel id look something like this?  00%0xx000000xxx0x0xx0x000000000xxx000%00thread.skype

     

    i have emails on my excel tables and was trying to feel those directly, but then also tried to pull the user profile and use the ID.  neither seems to work.

     

    thanks,

     

    Frac_0-1712185874458.png

     

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 392 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 270 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 210 Most Valuable Professional

Last 30 days Overall leaderboard