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.

Provision teams with the Graph

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.

Happy testing!

You may also like...

2 Responses

  1. March 24, 2019

    […] Update: I have created another blogpost which uses the Create Team method to create teams. […]

  2. March 29, 2021

    […] Sometimes I like a nice challenge. I came across a Tweet from Joanne Klein with a question about Microsoft Teams provisioning. This article describes how to create a team with PnP PowerShell and the Microsoft Graph. Update 24/03: I have created a new blog which uses the Create Team method. […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.