close
232-Practical-365-Blog-Header-Using-Powershell-to-apply-messaging-policies-to-Teams-users-LOW-002-340×200

Create Teams with Prepopulated Settings

The ability to create new teams using templates has existed for about six months. A template defines a prepopulated set of channels, tabs, and apps suitable for the purpose of the template. For instance, a template to create teams used to organize events might include channels for discussion about keynotes, audio-visual arrangements, room layouts, and so on. It might then have the channel calendar app preinstalled to coordinate meetings for each channel.

Microsoft publishes a set of 13 templates to cover scenarios from Office 365 adoption, running a help desk, to global crisis coordination. You can’t edit Microsoft’s templates, but you can create a new template by taking a duplicate the closest of Microsoft’s templates and editing the copy. The downside of this approach is that although you can remove some of the channels, you can’t remove any of the preinstalled apps.

It’s bizarre that Microsoft imposes this restriction exists, but to get full control, you can create tenant-specific templates from scratch and tailor their settings to meet the business and needs of the organization.

Controlling Access to Teams Templates with Template Policies

Up to now, users who can create new teams see the full set of Microsoft and tenant-specific templates. On February 26, Microsoft announced the availability of template policies (MC241754 – Microsoft 365 roadmap item 70701). As the name suggests, template policies allow organizations to control the set of templates visible to users.

To work with template policies, open the Teams admin center and select Template Policies under the Teams section. The default policy – Global (Org-wide default) allows full visibility of all policies. You can edit that to hide some policies, but it’s probably better to create a new policy and assign that to the accounts allowed to create new teams. Select Add to create a new policy.

I opted to create a policy to limit visibility to just the templates created in the tenant. After entering a name and description for the new policy, I chose all the Microsoft templates (Figure 1), clicked the Hide button, and saved the policy. In effect, the policy allowed visibility to just one template.

Editing the settings of a Teams template policy
Figure 1: Editing the settings of a Teams template policy

Note that if you add templates after creating a policy, Teams adds the new templates to the viewable templates list, and they become visible to users. You can hide up to 100 templates per policy. A tenant with so many templates to choose from probably confuses users with choice. As always, it’s usually a good idea to restrict the number of options available to guide users to making the best selection.

PowerShell Management

For now, management of templates must be done through the Teams admin center. According to MC231852, Microsoft will make the following PowerShell cmdlets available in early March:

  • Get-CsTeamTemplate: Retrieve details of a template.
  • Get-CsTeamTemplateList: Retrieve a list of available templates in the tenant.
  • New-CsTeamTemplate: Create a new template.
  • Remove-CsTeamTemplate: Delete a template.
  • Update-CsTeamTemplate: Update a template with new settings.

It’s expected that Microsoft will update the New-Team cmdlet to use these templates (a template parameter exists, but only for Education tenants).

Assign the New Template Policy to Users

After creating the new policy, the next step is to assign it to users. You can do this:

  • Individually, by selecting users and editing the set of assigned policies.
  • In bulk, by running a bulk policy assignment job with the New-CsBatchPolicyAssignmentOperation cmdlet for the TeamsTemplatePermissionPolicy policy type.

In this example, I create a list, add some accounts to it (you could import the accounts from a CSV file), and submit the block policy assignment job:

$PolicyUsers = [System.Collections.Generic.List[Object]]::new()
$PolicyUsers.Add(“Jane.Sixsmith@office365itpros.com”)
$PolicyUsers.Add(“Ken.Bowers@office365itpros.com”)
New-CsBatchPolicyAssignmentOperation -PolicyType TeamsTemplatePermissionPolicy -PolicyName “Tenant-only templates” -Identity $PolicyUsers -OperationName “Limit visibility to Teams templates”

Batch assignment jobs run at their own speed. Don’t expect instant results. This is something to submit and then go away to do other things.

Validating the Policy Works

Microsoft says that it can take up to 24 hours before a policy change is effective. That’s the worst case and typically you should see the new policy be effective within two hours.

The easiest way to test is to ask one of the users assigned the new policy to create a new team. If everything works, the Microsoft templates should not appear in the set presented to the user. As in Figure 2, all they should see are the tenant-created templates.

The new policy is effective and a restricted set of Teams templates is shown to the user
Figure 2: The new policy is effective and a restricted set of Teams templates is shown to the user

The introduction of Teams template policies is a welcome change. It’s not quite in the category of some of the announcements Microsoft plans for the Ignite virtual event next week, but fit and finish is important, and this is just another example of Microsoft building out the Teams infrastructure to make it easier to manage.

Source Practical365

Chioma Ugochukwu

The author Chioma Ugochukwu

Leave a Response