Skip to main content
Community site session details

Community site session details

Session Id : ++BodxLE73Ot9pTkBZvvMg
Power Automate - Building Flows
Unanswered

Issue with Create Private Channel via Power Automate?

Like (0) ShareShare
ReportReport
Posted on 11 Jun 2020 11:31:16 by

I'm creating a flow to provision Teams with a certain structure, a template, but when I get to the point of creating the private channel there is no way to get it right. I'm always trying to do the same using the graph explorer but when I paste the json body in power automate there's an error message.

 

This is the code that works in the Graph Explorer:

POST https://graph.microsoft.com/beta/teams/{group_id}/channels
Content-type: application/json

{ "membershipType": "Private",
 "displayName": "Confidential info",
 "members":[{ 
 "@odata.type":"#microsoft.graph.aadUserConversationMember",
 "user@odata.bind":"https://graph.microsoft.com/beta/users('<userID>')",
 "roles":["owner"]
 }]
}

and this is the request body according to the documentation:

POST https://graph.microsoft.com/beta/teams/{group_id}/channels
Content-type: application/json

{
 "@odata.type": "#Microsoft.Teams.Core.channel",
 "membershipType": "private",
 "displayName": "My First Private Channel",
 "description": "This is my first private channels",
 "members":
 [
 {
 "@odata.type":"#microsoft.graph.aadUserConversationMember",
 "user@odata.bind":"https://graph.microsoft.com/beta/users('{user_id}')",
 "roles":["owner"]
 }
 ]
}

I added the code from graph explorer directly to a flow but when I run it the following error message appears:

{
 "error": {
 "code": "BadRequest",
 "message": "channel cannot be null.\r\nParameter name: channel",
 "innerError": {
 "request-id": "<id>",
 "date": "<date>"
 }
 }
}

Any ideas?

Thanks!

  • Community Power Platform Member Profile Picture
    on 13 Jun 2020 at 09:47:52
    Re: Issue with Create Private Channel via Power Automate?

    hi @VictorIvanidze @efialttes I have already followed the advice in that website without any luck. As I commented I have accomplished creating a new channel through Graph Explorer but the same code fails when running a flow...

     

    Have you tried it even with a basic flow? Do you see anything missing in the http request?

  • VictorIvanidze Profile Picture
    12,554 on 13 Jun 2020 at 08:01:37
    Re: Issue with Create Private Channel via Power Automate?

    Have a look at this:

    https://myteamsday.com/2020/01/03/create-private-channel-graph-api/

  • Community Power Platform Member Profile Picture
    on 12 Jun 2020 at 10:16:44
    Re: Issue with Create Private Channel via Power Automate?

    @VictorIvanidze this is the whole flow. I also add an image of the error step and message.

    Flow_detailsFlow_details

     

     

    Flow resultsFlow results

     

  • VictorIvanidze Profile Picture
    12,554 on 12 Jun 2020 at 08:17:13
    Re: Issue with Create Private Channel via Power Automate?

    Hi @Anonymous, please show your flow. 

  • Community Power Platform Member Profile Picture
    on 11 Jun 2020 at 18:53:52
    Re: Issue with Create Private Channel via Power Automate?

    In fact I've tried a few approachs:

     

    - @odata.bind as a string inside a variable

    - the whole json inside a variable 

    - the double @ sign in front if odata.bind

     

    all of them with no positive results 

     

  • efialttes Profile Picture
    14,756 on 11 Jun 2020 at 13:23:27
    Re: Issue with Create Private Channel via Power Automate?

    Hi!

    Haven't tried myself but this article describes a similar successful scenario

    https://myteamsday.com/2020/01/03/create-private-channel-graph-api/

    Now, in the article's comments thread a similar issue is described

    Hope this helps

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete