Microsoft Teams provisioning with Power Automate and Graph API

I had a privilege presenting this session of mine today at Commsverse. I was asked, again, to publish my provisioning flow to Github and this time I managed to do it! To accompany that here are a few details about the provisioning.

The process follows this

  • Get the request to a SharePoint list. The provisioning flow triggers from that list
  • Ask user to enter more information : in the demo flow expected lifetime of the team is asked (in months) and that is updated to the list
  • If user requested a private or public team it affects if approval is asked or not. Demoing auto-approval part.
  • Set admin owner email to the correct one. This is just hardcoded since this is for demo purposes only.
  • Check the team you use for provisioning information & approvals.
  • Team is created based on template in the request. This uses Graph API so a premium connector access is needed. Team settings are done as well as some other configuration like channels and tabs.
  • Graph API calls need application id, client secret and tenant id set to variables
  • Requester is added to a team as owner
  • If private channel was requested it is created
  • Wikis are removed from all channels
  • A welcome message with requester atmentioned is posted to new team’s General channel.

Note! This is a demo flow used in presentations. This is not, and should not, be used in production as is. Feel free to grab ideas and check out how some calls are implemented. However this is not meant to be the real-world example (for example team is found matching it to user’s teams by name – in the real world there can be teams with the same name). This is quite straight-forward running Flow that gets the demo done.

SharePoint list settings

The list is defined like this

To see what values can be entered check out this order Form example. These are entered to the list using SharePoint Create item.

Get the provisioning Flow zip file from Github!

You can get the exported provisioning Flow package from GitHub.

Remember to

  • check the site and list name
  • match list & columns to different actions
  • Set Application ID, Client secret, tenant id and admin user name
  • Set team that is used as governance team to get the information and for approvals
  • not to use this in production as is. Use this for demo & Proof-of-concept purposes. Or at least make this handle errors and expectations.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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