laujan/msteams-sample-adminbot-csharp
A bot which uses the Microsoft Graph APIs for Teams to create teams, channels, and add members dynamically.
page_type: sample
products:
- office-365
languages: - csharp
description: "TeamsAdminBot is a bot which allows admin to create teams, channels & add members dynamically."
urlFragment: teams-admin-bot
extensions:
contentType: samples
createdDate: "7/26/2018 9:06:01 AM"
TeamsAdminBot
TeamsAdminBot is a bot which allows admin to create teams, channels & add members dynamically.
Note: Currently, this code does not support adding Guest/Freemium users.
Teams Admin Bot demo instance
There is a deployed demo instance of TeamsAdminBot that anyone can talk to.
- In order to try this bot please sideload the package present at
~\Manifest\TeamAdminBot.zip. - Bot will send welcome message with options to create new teams or add members to existing.
- You need to login before bot creates teams for you.
- Once login is successful, click on create/modify teams button.
- Bot will ask you to upload Teams details in an excel file. You can find sample input excel at
~\SampleInput.xlx. - Just Upload the file attachment and wait for bot to create teams for you.
Note: Send and receive files feature require that you enable Public Developer Preview mode in Microsoft Teams.
How to deploy your own TeamsAdminBot
This guide is written for an Azure oriented as it uses Azure Bot Service for Authentication.
Requirements
Steps
- Create a Bot in Azure.
- Register an Azure AD v2 application.
- Replace appropriate values in
~\Web.configi.e. MicrosoftAppId, MicrosoftAppPassword, ConnectionName & AzureWebJobsStorage with yours. - Run the Microsoft.Bot.Sample.TeamsAdmin project locally or deploy it on azure.
- Update '~\Manifest\manifest.json` and replace "id" and "botId" with your app id.
- Sideload this zip into any team of your choice using this guide.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or
contact opencode@microsoft.com with any additional questions or comments.