Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Create Teams private channel with members in Power Automate

Posted on July 28, 2024July 28, 2024 by Tom

“I’d like to create a Teams private channel for each new project, can I automate with with a Power Automate flow?”


Teams private channels are a great place to share more sensitive information. Instead of giving access to everyone in a Team, you can select only some of the users. At the same time, it can also help you separate the information, e.g. per project. But creating such channel takes some effort – create it with a proper name, add the owners, add the members… Why not automate it? To create such channel automatically once a project is created in a system?

Use the Graph HTTP request action

In the past I wrote articles on adding and removing members from a private channel. However, these solutions require an application registered in Azure and premium Power Automate licences.

Now there’s another action to use the Teams API without these prerequisites – Send a Microsoft Graph HTTP request.

No need for premium license, no need for Azure app, many operations available directly. One of them is creation of a new Teams private channel.

Method: POST

Uri: https://graph.microsoft.com/v1.0/teams/<TeamId>/channels

Body:
{
  "@odata.type": "#Microsoft.Graph.channel",
  "membershipType": "private",
  "displayName": "<channelName>",
  "description": "<channelDescription>",
  "members": [<array with channel owners/members>]
}

As you can see, there’re two placeholders additionally to the channel name and description. The first one is the TeamId in the Uri. Since you want to create a private channel, you must create it in a specific Team – hence the need for the team Id (= related M365 group id). You can get it using the ‘List teams’ or ‘List groups’ actions and extracting the id.

The second placeholder, the array with channel owners/members is more tricky. You can’t just list all the users by email addresses, you must create a whole object for each user.

{
  "@odata.type": "#microsoft.graph.aadUserConversationMember",
  "user@odata.bind": "https://graph.microsoft.com/v1.0/users('<userId>')",
  "roles": [
    "<member/owner>"
  ]
}

One user equals one such object in an array. If I want for example add myself to the private channel, I’ll get my user profile to extract my user id and add myself as the owner.

power automate create teams private channel

You can see also that I replace the ‘@odata.type’ string with an expression:

string('@odata.type')

It’s because Power Automate designer sometimes complains that the object is invalid when a property starts with @.

Once I append all the users, including their roles, into an array variable, I can use it to create the Teams private channel.

power automate create teams private channel

IMPORTANT! at the time of this article the Teams action above can’t add channel members later. It can add members/owners only during the creation, to manage memberships in existing channels you must follow the more complex path (add / remove).

Summary

As you can see, Power Automate can help you even in preparation phases of a project, e.g. when you need to create a Teams private channel for better cooperation. The Graph HTTP request action even makes it much easier – you don’t need anything setup in Azure, no premium licenses, all you need is the proper format of the request.

Get the Id of the Team where you want to create the channel, prepare an array with members/owners of that channel, and you’re good to go. Just keep in mind that each Team can have a maximum of 30 private channels.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

2 thoughts on “Create Teams private channel with members in Power Automate”

  1. Xavier SMEULDERS says:
    August 5, 2024 at 2:22 pm

    Hello,

    Thanks for this article, It’s exactly what I was lookinf for.
    Just a comment, form my sinde I receving an error message when I validate my flow due to variable function issued in the POST action : “The template function ‘variables’ is not expected at this location.”
    Can you plesae describe what you put on your Body field for this ?

    Reply
    1. Tom says:
      August 10, 2024 at 11:15 pm

      Hello Xavier,
      that’s a reference to the variable where I store all the users that should be added as shown on the 2nd image.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Are your approvals stuck due to unavailable approvers?

Keep your approvals running with the Approval task delegation app! Reassign any existing approval task to another user with a single click - no more waiting for absent approvers!

Power Automate approval task delegation ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes