Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 9zz4Oh4k/GD/HPeQtxsLkT
Power Automate - Building Flows
Answered

How to create a private channel in Microsoft Teams using Flow

Like (1) ShareShare
ReportReport
Posted on 26 Nov 2019 17:37:08 by

I easily created a public channel in Microsoft Teams using Flow and using the Teams connector / action.

How can I create a private channel though using flow? Is this possible?

  • VN Profile Picture
    2 on 15 Sep 2021 at 07:58:53
    Re: How to create a private channel in Microsoft Teams using Flow

    Yusha, i agree with @RobElliott , however it is possible to create custom connector and create private channel using graph API. Main difference is you have to define membership type as private and add members to it.

    Post request example is here:

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

  • jvdlinden Profile Picture
    329 on 19 Feb 2021 at 10:36:37
    Re: How to create a private channel in Microsoft Teams using Flow

    Hi @reatonfbcs what do you mean with "accessing private channels"?

    What do you want to achieve? Get a list of Private channels associated with a team?

  • reatonfbcs Profile Picture
    17 on 19 Feb 2021 at 10:28:16
    Re: How to create a private channel in Microsoft Teams using Flow

    What about accessing private channels from Flows? It appears all I can see is General.

  • Community Power Platform Member Profile Picture
    on 30 Nov 2020 at 15:09:32
    Re: How to create a private channel in Microsoft Teams using Flow

    @trashanger - just to clarify a bit.

    My original question was 

    How can I create a private Teams channel using the Teams Connector in Power Automate

     

    Microsoft replied; at this time that is not supported

     

    @jvdlinden  pointed out that though it is not supported, it definitely can  be done using HTTP Request module in Power Automate. Unfortunately this requires three things;

    1) Admin access to Microsoft Graph API for your org

    2) Using a API that is in a BETA version (be scared for your jobs that run in a production environment)

    3) Knowledge of building HTTP requests / receiving them etc

     

    So - we chose personally not to proceed forward until Microsoft makes this feature available through the Teams connector in Power Automate. If this is a must have requirement though, I would suggest following @jvdlinden solution.

  • trashanger Profile Picture
    2 on 27 Nov 2020 at 21:59:42
    Re: How to create a private channel in Microsoft Teams using Flow

    Hi,

     

    So there's no other way than having an app in Azure AD ?

     

    Thanks,

  • jvdlinden Profile Picture
    329 on 11 Jun 2020 at 19:53:16
    Re: How to create a private channel in Microsoft Teams using Flow

    Hello @P_SA ,

     

    Unfortunately I cannot provide a ZIP, but I will try as best I can to help you out.

     

    On beforehand, please note that this feature uses the Microsoft Graph beta endpoint, which should not be used for production applications because they are subject to change.

    Please review https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-beta for additional details.

     

    Now follow these steps: https://docs.microsoft.com/en-us/graph/auth-v2-service

    This will explain how to (1) register your app in Azure AD, (2) how to configure the appropriate permissions for Microsoft Graph, (3) how to provide admin consent for the application (the global admin can also navigate to Azure AD, open your app registration and provide consent), (4) obtain an access token from Microsoft Graph and (5) how to call the Microsoft Graph using the access token.

     

    How this looks like from my Azure Logic Apps, please review the screenshots below:

    Use the HTTP action to call Microsoft Graph for an access token

    1- obtain access token.png

    red values are obtained from your app registration and after generating a client secret (there may be better ways to increase security for these types of calls)

     

    Use "Parse JSON" action to parse the JSON payload coming back (response), simply use the blue link "Use sample payload to generate schema":

    2- parse access token response.png

    Or use the schema below:

    {
     "properties": {
     "access_token": {
     "type": "string"
     },
     "expires_in": {
     "type": "integer"
     },
     "ext_expires_in": {
     "type": "integer"
     },
     "refresh_token": {
     "type": "string"
     },
     "token_type": {
     "type": "string"
     }
     },
     "type": "object"
    }

     

    Now you have the access token, I am retrieving a user profile details from "Office 365 Users" to obtain the user id by providing the email address of the user:

    3- get O365 user profile.png

     

    Finally I am calling the Microsoft Graph beta endpoint to actually add the private channel:

    4- create private channel (first part).png

    Provide the Office 365 Group ID, here I am using a dynamic value.

    Make sure there is one (1) white space between token_type and access_token

    Provide the body JSON object, here I am adding two individual users as an owner to the private channel.

    5- create private channel (second part).png

     

    Hope this helps.

  • P_SA Profile Picture
    220 on 11 Jun 2020 at 17:22:50
    Re: How to create a private channel in Microsoft Teams using Flow

    @jvdlinden  Hey, do you mind sharing the export .zip file of the flow that you have created. ? It will really help.. thanks.

  • jvdlinden Profile Picture
    329 on 03 Jun 2020 at 09:36:41
    Re: How to create a private channel in Microsoft Teams using Flow

    I have tested out the Office Graph approach. It actually does work.

    The user performing the HTTP POST will also be the owner of the Private Channel. You'll need to provide additional owners in the body if required.

  • jvdlinden Profile Picture
    329 on 02 Jun 2020 at 14:55:12
    Re: How to create a private channel in Microsoft Teams using Flow

    @Anonymousthanks for your reply.

    Short answer: no.

    I am about to try this feature out in the upcoming days because I really need the private channel to be created automatically.

    I disagree about your remark, premium features are actually solutions... The question is: cost vs benefits? 

    I will update the thread once I know if it really technically works.

  • Community Power Platform Member Profile Picture
    on 02 Jun 2020 at 14:03:33
    Re: How to create a private channel in Microsoft Teams using Flow

    @jvdlinden Unfortunately 'HTTP Requests' are a premium feature of Power Automate, so this isn't really a valid solution. Did you actually try the solution that you linked? I think, at one point, I did try it - and it did not work. Also note that the Microsoft employee above confirmed that they do not support this in Power Automate, he didn't mention the premium feature.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 81

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard