Teams Flow

Paweł Czarnecki

Teams flow
November 27, 2018 Katarzyna Sobczak

Teams flow

Creating Teams through SharePoint list

The introduction of the Office Groups (previously known as Modern Groups and Outlook Groups) in Office 365 gave users the ability to create complex objects including: a mailbox, the team website and access to a range of applications whose aim is to facilitate the co-operation without the need to involve the Administrator.

Thanks to the automation of the application delivery process for shared workplace for the users, the system took over some of the responsibilities from the IT Administrator. This tool creates file storage, shared mailbox, and provides new options for the application to work; everything on demand for the selected group of users.

With Office Groups, the O365 Administrator is relieved of certain tasks carried over to the system and users. Some of the routine tasks are delegated to standard users, but such a solution can cause different kinds of problems, especially when the user starts creating groups without a central co-ordination. If employees of several business divisions create groups with similar names (and, thus, similar e-mail aliases), such action can make it difficult for other users to select the appropriate team or may result in an accidental sending of e-mails to the wrong recipient. Therefore, the administrator should have control over the process of creating groups, executing additional preparation steps for self-managed groups.

The administrator has several options in this area:

  • blocking the ability to create groups of Office users,
  • limiting the ability to create Office Groups only to selected group of users,
  • creating a group naming policy Office (naming policy, determining the prefix and suffix names, changing the default domain),
  • creating an Office Group, using the list on the Sharepoint site and automating the process with the help of Flow mechanisms.

The mentioned automaton of the process is described by Martina Grom and Toni Pohl on their company blog.

When Microsoft Teams was announced, users could create a team based on existing Office Group expanding their functionalities within the application. The new product allows the users to combine services that were available earlier only in a browser window. In addition, the Teams application also gives the possibility to attach files, such as PDF and Word, directly to the window and to continue further co-operation without introducing changes to the application. I already described Microsoft Teams in the article Microsoft Teams w Edukacji.

Thanks to the intuitive menu and shared features, Microsoft Teams started to be used by a wider group of users which had not used the Office Groups before. Consequently, the administrators were able to notice a problem with the quantity and the naming of the groups Office in their organizations.

Because of that, It has become more important, especially for large organisations, to have the ability to control the creation of teams in Microsoft Teams 😊. Unfortunately, Microsoft does not provide features to create assemblies using the Flow, so you cannot use directly the method described above.

An alternative solution to this problem is PowerApps application shared by Christian Glessner. Unfortunately, the published method has limitations related to credentials limitation, which forces the user to reauthenticate after a few hours. After introducing the modification of the authentication procedure, however, you can run this application without time limitation in the production environment.

Below I present the process of setting up a team in Teams by adding items to a Sharepoint list.

The whole process starts with the Registration of the application in the Azure admin portal, which is necessary to prepare OAuth authentication for our application in Office 365.

In order to do that, we go to portal.azure.com, and then to app registration. We create an entry as shown in the image by providing the name and address under which it will be available.

In the keys section (the Keys) we generate the key that will be used later on to authenticate the application.

In the Required Permission, you must grant permissions to the Microsoft Graph:

Read all groups

Read and write all groups

Read directory data

Read all user mailbox settings

For Azure Active Directory, you must add the Active Directory permissions to:

Read directory data

Read and write directory data

Read and write all groups

Read all groups

Now we can go back to building apps with PowerApps on the website web.powerapps.com.

In the main window, choose the option “create a custom connector” and “import a file with the OpenAPI”.

On the first screen of the wizard, we give the name of the application.

On the second screen you must select the method of authentication, provide the key generated in the Azure, our tenant id and also fill up additional fields.

After saving these settings, you will receive the replay url (fake url necessary for authentication purposes) which should be added to the previously created applications in the Azure portal.

After configuring the application in the Azure portal and PowerApps site, we can move on to the flow creation.

In my example I will use the list on the Sharepoint site.

To create the list, we need to select a site on which it will be created, then we choose the new-list component to add.

After the list has been created, you must edit its columns. In my example I changed the box “Title” to “proposed group name,” and I added the additional box “email members”. Values of these fields will be used in the workflow.

From the list view we can choose an option to create a Flow that will trigger the action of acceptance when you add a new record to the list.

This flow should include such elements as: creating Office Group with the suggested name, adding the appropriate members based on the created item list and, of course, the forming of the team based on group ID. The flow can be completed with the sending of a notification e-mail to the person who created the entry.

The screenshot presented below depict the proposal of the flow with all added elements.

The flow is started with creating an entry by the user on the specified Sharepoint list.

The creation of an entry triggers the process of acceptance by sending an e-mail to the administrator. In the body of the message there are included: the proposed name of the team, the name of the user who asked for creation of such a team, and the ability to accept straight from the e-mail account.

If the approval is granted by the administrator, the creation process continues. The user who created the request will then receive a confirmation message stating that the Team has been created.

After receiving the acceptance, the system automatically creates an Office Group with the given name (we can add here prefixes and suffixes as well as other data such as the Department of the user).

The following users, i.e. the Administrator of acceptance and the user that issued a request to create a team, will be added to the newly created Group. Moreover, if additional Members have been included in the request together with their e-mail addresses, these users will also be added to the Group. Particular attention should be paid to the setting of the flow so as to make sure that even in the case of an absence of the e-mail value for additional member, the process will continue.

After the creation of the Group and the addition of the members, PowerApp is launched to create a Team based on the Office 365 Group ID.

After the positive completion of the flow, an e-mail regarding the information about the successful end of the process is generated for a person who issued the request.

Thanks to that, the administrator has full control over the process of Teams creation in his organisation and he is also a member of the teams. Restricting the formation of teams by introducing the process of creating them through the entries on Sharepoint allows the administrator to avoid creating too many groups and teams in the organisation while, at the same time, permitting the users to fully utilise their features.

Remarks regarding the creation of the team in this way:

The administrator, who is logged on to services within the flow, will be the owner of the team.

The name suggested by the user must not contain neither spaces nor Polish letters. It is related to the creation of the e-mail address which is then assigned to the group.

The user will be a member of the team but will not have the privileges of the administrator.

The permission for using Team functionalities (e.g. adding tabs and others elements) is based on the selected options available in the application settings within the flow. The settings can be edited by the administrator.

Thanks to the creation of Teams with the use of this procedure, the administrator has the opportunity to secure the team settings against various unwanted changes and against the improper use of the Teams.

Share

Author: Paweł Czarnecki

Paweł Czarnecki

Paweł Czarnecki

Team: Communication & Collaboration

Latest posts

Teams flow

Teams flow

Wprowadzenie Grup Office (wcześniej nazywanych również Modern Groups i Outlook Groups) w usłudze Office 365 dało użytkownikom możliwość tworzenia bez angażowania Administratora obiektów posiadających skrzynkę pocztową, witrynę zespołu i dostęp do szeregu aplikacji ułatwiających współpracę.

Contact with Paweł

 

The data controller for the information collected using this form is Promise. The data you provided will be processed to the extent necessary for a contract or to take steps at your request, in accordance with Article 6.1.b of RODO, for the period necessary to carry out your request. Our Privacy Policy has all the information about your rights and about processing the data provided in the data form. If the information provided above is not detailed enough, click to learn more!