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
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
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With