Create template based teams with PnP
After posting a blog about creating a team I saw Microsoft had updated the Create team method in the Microsoft Graph API beta recently. That’s the beauty of Office 365, everything improves so fast! Time to write a part two of my blog post 😉
The new API endpoint
Recently Microsoft released a new Beta Graph API method called Create Team. With this method you are able to create teams with just one request. So compared to my previous post this is easier when you want to create a team from scratch.
Provision multiple teams
While in my previous post I created just one team I thought it would be nice to provide a different solution this time. In this solution I will provision multiple teams and use a csv file as input.
Using a csv
This is the CreateTeamsExamples.csv, notice the template bind column which has values for a Hospital and Retail Teams template.
The new code
Below is the CreateTeamsInBulk.ps1 PowerShell script. Again feel free to use it (of course at your own risk ;)).
A Mash Team
This is how one of the teams will look like after they are provisioned.
About pre-defined templates
One of the other advantages is that in this method you can use pre-defined templates from Microsoft. At the moment they have base templates for Retail, Education and Healthcare. These templates will provision some additional channels and settings.