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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Add user to Microsoft ...
Power Automate
Answered

Add user to Microsoft Teams Channel(private) using Microsoft Flow/Power Automate

(0) ShareShare
ReportReport
Posted on by 315

Hey,

 

I have power app which is integrated within Microsoft teams private channel, now i need to provide access to users for that specific Microsoft teams channel using Power Automate. Any help is appreciated.

 

I have used sharepoint as data source and is their any chance where i can provide sharepoint site permissions to user as well using power automate including app share as well.

In a nutshell, i need to make app accessible to new users by just one click using power automate.

Categories:
I have the same question (0)
  • Verified answer
    RobElliott Profile Picture
    10,397 Super User 2026 Season 1 on at

    @kbilakanti it's not possible to add a user to a channel using Power Automate, there isn't an action for that.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • jvdlinden Profile Picture
    329 on at

    You can use the Microsoft Graph API:

    Solved: Add members to private channel from power automate - Power Platform Community (microsoft.com)

  • francoisharmse7 Profile Picture
    6 on at

    This was my solution. The challenge I had was to add a guest user to a private channel via powerautomate.

     

    This is my solution to add Guest Users to Private Channels in MS Teams with PowerAutomate.

    Step0 - Register the domain of the Guest Users in your AD account as a valida Guest Domain

    Step1 - User a registration form (MS Forms)

    Step2 - Create a Trigger Process in MS PowerAutomate to receive the Form Data. I like to create small/short flows to only capture and validate form data, and then call a separate Flow / RestService. This makes your solution a little bit more decoupled and reusable. (Imagine replacing the Form with a web app form or mobile app form in the future).

    francoisharmse7_9-1639398410686.png

     

    Create a second HTTP request trigger flow receiving the Form data (optional way to setup multi-flow solution)

    francoisharmse7_10-1639398410628.png

     

    Step3 - Create a Private Channel in teams via GrapAPI

    GraphAPI - POST https://graph.microsoft.com/v1.0/teams/<teams_id>/channels

    POST BODY:

    { "membershipType": "private", "displayName": "<e.g. channel name from form data>", "description": "<e.g. description from form data>", "members": [ { "@odata.type": "#microsoft.graph.aadUserConversationMember", "user@odata.bind": "https://graph.microsoft.com/v1.0/users('owner.user@mydomain.com')", "roles": [ "owner" ] } ], "@odata.type": "#Microsoft.Graph.channel" }

    francoisharmse7_11-1639398410676.png

     

    Step4 - Call GraphAPI to retrieve the Guest User Details

    GraphAPI: GET https://graph.microsoft.com/v1.0/users?$filter=mail eq 'guest.user@email.com'

    I have added this in a loop - since I had many members who had to be added - and I also included a condition check to check if the domain is indeed valid

    francoisharmse7_12-1639398410658.png

     

    Now you can assign the output (or portions of the output) to some variables

    Step5 - Retrieve the ID value from the step above (Step4). This is the value that must be used to add the new guest member.

    francoisharmse7_13-1639398410612.png

     

    1. Retrieve the ID from the Step4 output
    2. Also set a variable to the account type - which should (MUST BE) be "guest"

    Now - Add guest users to the private teams channel

    Step6 - Call GraphAPI to add guest members

    GraphAPI: POST https://graph.microsoft.com/v1.0/teams/<team_id>/channels/<channel_id>/members

    Post Body: The role must be "guest" for guest account But valid options for other types of access can be

    1. owner
    2. member
    3. guest

    Microsoft documentation (HERE) states roles must be owner or empty This did not work so well for me. Use guest

    { "@odata.type": "#microsoft.graph.aadUserConversationMember", "roles": [ "@{variables('membership_type')}" ], "user@odata.bind": "https://graph.microsoft.com/v1.0/users('@{variables('principal_user')}')" }

    francoisharmse7_14-1639398410682.png

     

    Bonus Step Now you can catch all responses from the previous steps and respond back with an HTTP Request/Response connector.

    1. A 200 response on successful executions
    2. A non-200 response on failed executions (or how ever you desire) francoisharmse7_15-1639398410611.png

       

    To configure exception handling or failure handling responses do this below

    francoisharmse7_16-1639398410683.png

     

    francoisharmse7_17-1639398410619.png

     

     

  • wind0soft Profile Picture
    38 on at

    Hi, can anyone provide an update for this based on the new HTTP Graph connector: 

    wind0soft_0-1698097541185.png

    I can create a channel no problem using:

    wind0soft_1-1698097630499.png

    But anytime I try and add a new owner the flow will not save:

    wind0soft_2-1698097750587.png

    I've tried this code:

    { "@odata.type": "#Microsoft.Graph.channel", "membershipType": "private", "displayName": "Private corner again", "description": "This is for private content", "members": [ { "@odata.type":"#microsoft.graph.aadUserConversationMember", "user@odata.bind":"https://graph.microsoft.com/beta/users('{UserID1}')", "roles":["owner"] }, { "@odata.type":"#microsoft.graph.aadUserConversationMember", "user@odata.bind":"https://graph.microsoft.com/beta/users('{UserID2}')", "roles":["member"] }, ] }

     

    And I've tried adding a second @ sign but it will not save.  

     

    wind0soft_3-1698097895251.png

     

    Any ideas would be greatly appreciated!

     

  • jvdlinden Profile Picture
    329 on at

    Hello @wind0soft I notice that in the plain text code you pasted, at the very end of your members array, you leave a comma. This one should be removed otherwise there is another user to be expected in the JSON array. But I do not see the comma in your image.

     

    You can also use the website https://jsonlint.com/ to verify your JSON code.

    Below I provide you with an a working example of how I have created a private channel (with members):

    Create private channel.png

    I hope this helps.

     

    By the way: I use the default 'HTTP' action, but I guess it would be the same in your case. I use the same method and request URL.

  • wind0soft Profile Picture
    38 on at

    Hi all-

     

    I really appreciate the feedback but unfortunately it didn't work for me.  Yes in the code I posted there is a extra comma.  However, even with code that is validated 

    wind0soft_0-1698160582221.png

    I get an error in power automate

    wind0soft_1-1698160633599.png

    However, if I use this connector 

    wind0soft_2-1698160809168.png

     

    The code will save but then I get a error when it runs with a Bad URI result.  

     

    Any thoughts?

  • jvdlinden Profile Picture
    329 on at

    Just checking, did you use URL https://graph.microsoft.com/ while setting up the connection? As suggested here: Solved: Http Request with Graph - Power Platform Community (microsoft.com)

     

    You can also try to use the action 'Send an HTTP request' (Office 365 Groups) to perform actions on Microsoft Graph. In my case that works too (delegated):

    jvdlinden_0-1698216411512.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 58

#2
David_MA Profile Picture

David_MA 53 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 36 Most Valuable Professional

Last 30 days Overall leaderboard