question

BhaskarGandavabi-6984 avatar image
0 Votes"
BhaskarGandavabi-6984 asked Prasad-MSFT commented

Can a bot create a new private channel programatically?

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

office-teams-app-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Prasad-MSFT avatar image
1 Vote"
Prasad-MSFT answered Prasad-MSFT edited

Please refer below doc which explains how to create private channel using Graph API
https://docs.microsoft.com/en-us/graph/api/channel-post?view=graph-rest-1.0&tabs=http#example-2-create-private-channel-on-behalf-of-user


Thanks,

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BhaskarGandavabi-6984 avatar image
0 Votes"
BhaskarGandavabi-6984 answered Prasad-MSFT commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please make sure you have valid 0365 subscription and you have added required application permissions to your app registration.

0 Votes 0 ·