| page_type | sample | ||||
|---|---|---|---|---|---|
| description | This is a sample application which demonstrates how to create meeting in bulk on Teams calendar. | ||||
| products |
|
||||
| languages |
|
||||
| extensions |
|
||||
| urlFragment | officedev-microsoft-teams-samples-graph-bulk-meetings-csharp |
This is a sample application which demonstrates how to create meeting in bulk on Teams calendar use to create meeting to upload excel sheet.
- Microsoft Teams is installed and you have an account (not a guest account)
- .NET 6.0 SDK.
# determine dotnet version dotnet --version```
- ngrok or equivalent tunneling solution
- M365 developer account or access to a Teams account with the appropriate permissions to install an app.
Note these instructions are for running the sample on your local machine, the tunnelling solution is required because the Teams service needs to call into the bot.
-
Run ngrok - point to port 3978
ngrok http --host-header=rewrite 3978
-
Setup for AAD app registration In Azure portal, create a AAD app registration - Navigate to API Permissions, and make sure to add the below permissions: - Select Add a permission, select Microsoft Graph -> Application permissions. -
Calendars.ReadWrite-Calendars.Read- Click on Add permissions. Please make sure to grant the admin consent for the required permissions.Navigate to the Certificates & secrets. In the Client secrets section, click on "+ New client secret". Add a description (Name of the secret) for the secret and select “Never” for Expires. Click "Add". Once the client secret is created, copy its value, it need to be placed in the appsettings.json file.
-
Setup for Bot In Azure portal, create a Azure Bot resource.
- For bot handle, make up a name.
- Select "Use existing app registration" (Create the app registration in Azure Active Directory beforehand.)
- If you don't have an Azure account create an Azure free account here
In the new Azure Bot resource in the Portal,
- Ensure that you've enabled the Teams Channel
- In Settings/Configuration/Messaging endpoint, enter the current
httpsURL you were given by running ngrok. Append with the path/api/messages
-
Clone the repository
git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
-
Launch Visual Studio
- File -> Open -> Project/Solution
- Navigate to folder where repository is cloned and then open this file
samples/EventMeeting/csharp/EventMeeting.sln
-
Setup and run the bot from Visual Studio: Modify the
appsettings.jsonfile with the following details:- Update configuration with the
MicrosoftAppId,MicrosoftAppPasswordandMicrosoftAppTenantIdvalues received while doing AAD app registration in your Azure portal. - Press
F5to run the project
- Update configuration with the
-
Modify the
manifest.jsonin the/Manifestfolder Replace the following details:<<Your Microsoft App Id>>with your MicrosoftAppId received after doing AAD app registration in your Azure portal.{{BASE-URL}}with base Url domain. E.g. if you are using ngrok it would behttps://1234.ngrok.iothen your domain-name will be1234.ngrok.io.- Zip up the contents of the
Manifestfolder to create amanifest.zip - Upload the
manifest.zipto Teams (in the Apps view click "Upload a custom app")
To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.




