How to provision Microsoft Team using PnP tenant template

Plumsail Actions have action for provisioning PnP Tenant templates. Those templates are basically the same PnP templates, but instead of provisioning some lists and libraries to specific site you can create entities of a higher level. For example, you can provision Microsoft Team.

Automating provisioning of a new Microsoft Team for new projects.

Let’s say, you have a SharePoint list called “Projects”. This list has only two fields:

Title - Project name Owner - SP User, project manager.

When a new item is added to this list we’ll set up workspace for new project team and create a Microsoft Team automatically using Power Automate Flow.

We can use this PnP code to create the workspace:

  <pnp:Team DisplayName="Title" Description="" Visibility="Private" Photo="TeamData/TEAM_ef3020c6-1953-4367-b7c5-a6da8e24d049/photo_ef3020c6-1953-4367-b7c5-a6da8e24d049_432X432.jpg" Specialization="None">
    <pnp:FunSettings />
    <pnp:GuestSettings AllowCreateUpdateChannels="false" />
    <pnp:MembersSettings />
    <pnp:MessagingSettings />
        <pnp:User UserPrincipalName="Owner" />
        <pnp:User UserPrincipalName="[email protected]" />
    <pnp:DiscoverySettings ShowInTeamsSearchAndSuggestions="false" />
      <pnp:Channel DisplayName="General" Description="test" ID="19:[email protected]">
          <pnp:Tab DisplayName="Lists and Pages" TeamsAppId="2a527703-1f6f-4559-a332-d8a7d288cd88"/>
          <pnp:Tab DisplayName="Docs" TeamsAppId="">
            <pnp:Configuration EntityId="" ContentUrl="" RemoveUrl="" WebsiteUrl="" />

The sample creates a team, adds a channel, and adds 2 tabs to the channel.

The complete flow is below.

Move Documents To Archive

Adding the Plumsail action for the first time, you’ll be asked for a Connection name and Access Key.

New connection

You can type any name for the connection. For example, “Plumsail Actions”. Next create an API key on your Plumsail account page, copy, and paste it to the “Access Key” field.


That’s all! These few steps can help you to create a simple archive system that moves old documents from a source folder to your archive.

You may also extend this system by creating a specific folder for every run of this flow with Create SharePoint Folder by URL and Create SharePoint Folder in List actions.

It may be very useful if you need to archive your documents into the folder. For example, you may want to put a current date in the name.