Can a bot create a new private channel programatically?

Bhaskar Gandavabi 21 Reputation points

I am trying to create a bot (a Teams app) that can create new private channels as needed. Is that possible? I am able to do this in Slack and was wondering if the same is possible in Microsoft Teams

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,072 questions
0 comments No comments
{count} votes

Accepted answer
  1. Prasad-MSFT 3,851 Reputation points Microsoft Vendor

    Please refer below doc which explains how to create private channel using Graph API


    Prasad Das

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bhaskar Gandavabi 21 Reputation points

    I have a followup question. I am trying to write a Teams App that uses an Azure Bot. When I login to Graph Explorer, I am able to run these commands and successfully create a channel. But, when I try to use the Microsoft AppID/Secret combination to obtain an access token outside of Graph Explorer (I am using Postman), I am getting an error that my access token is wrong or I do not have a valid Office 365 subscription. I am trying to develop a Teams App that I can list on Microsoft Teams Appstore. In that case, I want my code to be able to run anyone's Teams installation not just my own.