Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I create channels in Microsoft Teams using the API?

I am not a programmer - just trying to find the answer to a question about Microsoft Teams. I'd like my dev team to automate some processes in Teams including the creation and archive of channels. Can anyone let me know if this is possible via the API?

TIA

like image 730
Adam Morris Avatar asked Aug 31 '25 22:08

Adam Morris


2 Answers

Channels are available in Microsoft Graph API (on beta endpoint). To create a channel, you can POST to a /channel endpoint:

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

{
  "displayName": "Channel Name",
  "description": "Channel Description"
}

{id} in the request URL is the ID of the Team (not to be confused with the ID of Group that owns the team). The request needs to contain Auth token (bearer token) in Authorization header.

More info about this method is available on Microsoft Graph documentation page: https://learn.microsoft.com/en-us/graph/api/channel-post?view=graph-rest-1.0

like image 133
Dragan Panjkov Avatar answered Sep 04 '25 02:09

Dragan Panjkov


I've created a command line tool that lets you bulk create new Microsoft Teams channels using the Graph APIs outlined above. It's written in C# and .NET Core, and includes instructions that describe how you register your application for use with your Teams environment.

https://github.com/tamhinsf/ChannelSurf

Feel free to use it as an example or starter kit for your own needs!

like image 28
Tam Huynh Avatar answered Sep 04 '25 02:09

Tam Huynh