Teams Real Simple with Pictures: App Setup Policies for Messaging Extensions

This blog is part of a series on Teams. For more articles, check back often

Written: 17/04/2022 | Updated: N/A

It’s been a good week. I tend to measure things by whether I am playing offense or whether I am playing defense. This past week has been more offense. But it’s good largely because after Teams Nation and NCE I am finally getting back to some sort of normality. That means I am beginning to have some bandwidth to do things such as the blog. In time, hopefully that’ll mean other things such as the Tech Community too. So earlier this week I had a little flurry and explored a few different things such the ability to block folders and file sync in a team, disabling add shortcut to OneDrive, and utilising the keyword trigger in Power Automate to launch flows right out of a channel. To round off, I am going to take another look at Teams Policies, and configuring Messaging Extensions within App Setup Policies. Yes – the app policy doesn’t just cover the app rail anymore. But my memory is, admittedly, a little hazy at this point. You’ve had the ability to install apps into Teams themselves via App Setup Policies for some time. Installing extensions? I can’t honestly remember if this was always a part of it. Pinning extensions looks to have been added recently whilst I’ve been away. But it’s no matter – I’ll cover both. For the casual user of Teams what exactly are Messaging Extensions? Messaging Extensions allow users to interact with web services from the compose message area, the command box, or directly from a message. You should, for example, be familiar with the apps underneath the compose box in a channel or a private chat. Now, there is nothing revolutionary in this add. It’s largely doing the same thing as has always been done with the app rail, except you now have the ability to do it for messaging extensions. The same pros and cons remain. Pros? Standardisation. Ease of Access. Not having to install if you choose to install. Cons. Too restrictive. Too rigid with changing work patterns and use of apps, the over-installation of apps into Teams which may never use them. But honestly it’s all good fun. Maybe except if you have a few thousand Teams or few thousand users. But I don’t.

Let’s go.

This blog will cover

  • Configuring Messaging Extensions in an App Setup Policy
  • Checking it has worked
  • Removing and Modifying Messaging Extensions in an App Setup Policy
  • FAQ

Prerequisites

  • Teams Service Administrator or Global Administrator Permissions
  • Teams Licence (Within Microsoft 365 Licence) for testing

CONFIGURING MESSAGING EXTENSIONS IN AN APP SETUP POLICY

1.) Log into https://login.microsoftonline.com using admin credentials

2.) From the app launcher, select Admin

3.) In the Microsoft 365 Admin Centre select Show All on the left nav, then Teams

4.) In the Teams Admin Centre, select Teams Apps, then Setup Policies

5.) At this point you can choose an existing App Setup Policy, such as the Global Org Wide Default which is the default policy applied to all users unless they have another policy specifically applied, and modify that. However, this example will create a Custom App Setup Policy to apply. Select Add

6.) Give the Custom App Policy a Name and Description. This example uses Custom AS Policy

7.) Specify whether the user of the policy can a. – upload custom apps, otherwise known as sideloading and b. – whether a user can pin their own apps on the app rail or as messaging extensions. This example sets both sliders to Off as both will be defined solely by the custom app policy

8.) After specifying the name and description of the policy as well as the sideloading/user pinning settings, it’s time to specify whether apps and messaging extensions are installed on behalf of the user in their teams and meetings. This is an optional step and isn’t mandatory as apps and messaging extensions can simply be pinned without being installed and left to the users discretion to install and use them. It is arguably an important part of seamlessly setting up messaging extensions without complexity and reducing friction, so this example will install the messaging extensions

Select Add Apps

9.) Search for and select the app to be used as a messaging extension. This example will select Power BI. Once done select Add

10.) Rinse and Repeat until complete. This example searches for and selects Power BI, Praise, Approvals and Forms which are four apps which users to be able to use as Messaging extensions in their Teams conversations and private chats

11.) To finish off the App Setup Policy, Pinning will now be configured. By default there are a number of default apps set for the left app rail but none for Messaging Extensions. Select Add Apps

12.) Search for and add an app to be used as a messaging extension. This example will again use Power BI. Select Save once done

13.) The app, if it can be used as a personal app and a messaging extension will appear in both columns. As we only want to add it as a messaging extension, select in under the App Bar Column and then select Remove. This will leave it only in the messaging extension column.

14.) Rinse and repeat this for all the apps needed to be pinned for Messaging Extensions. This uses the four set to be installed earlier – Power BI, Praise, Approvals and Forms. In other words from a users perspective all four should display below the compose box when writing a message, and when selected be good to go

Once done select Save

15.) The Custom App Setup Policy is now complete.

16.) The App Policy can be assigned in a number of ways. Direct to a user. By Batch. By Policy Package or by Group Policy. These have all been discussed in this blog series previously, with dedicated blogs on policy packages and group policy also covers policy precedence. This blog will take the most direct route and assign it directly to a user.

In the navigation, select Users and then Manage Users

17.) Select the user, select Edit Settings, search for and select the new app policy under App Setup Policy. Once selected, select Apply which applies the custom app setup policy to the user

18.) Drilling into the user, the new policy has been applied

Our job here is done. The messaging extensions will be set once the policy applies. However, it could take a few hours for the new policy to propagate and reflect in the Teams Client

CHECKING IT HAS WORKED

After a few hours check in the Teams Client that the messaging extensions have updated when composing a new message. They have updated for both Teams private chats (as shown) and for Teams Channel Conversations

REMOVING OR MODIFYING MESSAGING EXTENSIONS FROM AN APP SETUP POLICY

To remove an app from the messaging extensions within the app setup policy return to the policy in the Teams Admin Centre and select the app under Pinned Apps, remove and then select save to update the policy. In the case of modifying the policy remove the apps not needed and then add other apps per the process above. The choice to install the apps remains an optional step

FAQ

Q. How do I even know if an app can be a messaging extension?
A. In the TAC, search for and select the app under Manage Apps. You can also check the App Store in the Teams client. If it is used with Messages it can be used as a Message Extension

Q. Is it necessary to install messaging extensions if you are pinning them?
A. No, installing them is optional. Pinning them shows them as messaging extensions under the compose box – but if not installed, when the user first uses them they may be asked to add/install them. Installing them means when they first use the app they should not be asked to add them. So installing them should make the user experience smoother with less friction. However, installing them means they will be installed into all the teams that user uses so, administratively, it could become complex

Q. What is the max number of messaging extensions which can be pinned?
A. From testing? At least 12 – although it’s unlikely that all these will display down the bottom of the Teams compose box and many would be under more options (…). If it is similar to the app rail it will be a minimum of two and unlimited max

Q. What if the app I am looking to add as a messaging extension cannot be found?
A. Interestingly, not all messaging extensions are supported by App Setup Policies. Weather is a good example. If it is not supported you will not find it in the search. However, that doesn’t mean it cannot be used as a messaging extension, it simply means it isn’t supported in the app setup policy and so if a user wants to use it, then assuming they can do so via the app permission policy they can search for the app in Teams, install it and use it

Q. Does use still adhere to Teams Permissions Policies?
A. Yes, if a user is blocked from using a specific app (for example Forms), they will not be able to use it as a Messaging Extension even if it were set in the App Setup Policy applied to them

Q. This example showed a custom app setup policy? Why not just use the global org wide default?
A. The global org wide default is the policy applied to all users who have no other app policy applied, the one which is set when the users first start using Teams. Whilst it can be changed and modified, it is not recommended to change it, rather leave it as a default configuration, and create custom policies. Setting the global org wide policy for all users for an SMB may work, however it is unlikely to work the larger the organisation is due to app needs across the organisation

Q. Can you reorder messaging extensions?
A. Yes. If user pinning is turned off the admin can modify the app policy and flip the messaging extensions around using the parallel lines as shown in the below shot, then save the reordered. If user pinning is turned on then the user can reorder all pinned apps, both admin pinned and user pinned

Q. Does Policy Precedence apply to App Setup Policy?
A. Yes, because App Setup Policies can be implemented with Group Policy policy precedence can apply. In policy precedence, direct assigned policies (adding direct to user and policy packages) win out, followed by ranked group policies. Last comes the fallback global org wide default

Q. Can Messaging Extensions in App Setup Policies be used for Private Channels
A. No, private channels do not currently support Messaging Extensions at the time of writing

Q. Can the Message Extensions set in the App Setup Policy ever be at the start of the compose box?
A. No, there are a number of Messaging extensions that appear before the ones in the app setup policy. Many of these can be removed by the messaging policy – priority notifications, gifs, stickers and memes can all be disabled. Loop can be disabled by SharePoint PowerShell. But AFAIK, formatting, attachments and emojis cannot be disabled and will always appear before the messaging extensions in the App Setup Policy

Q. Can this be applied through PowerShell?
A. This is a bit of a grey area. Docs says that the PowerShell actions for App Setup Policies should not be used (check here) However, having just checked with Get-CsTeamsAppSetupPolicy this works just fine and returns the following. I would need to test – but given this I would assume a.) It works and b.) That Message Extensions are defined by -PinnedMessageBarApps, and for example we could use the New, Set and Grant commands. It’s probably docs being out of date in this area and referring to the old Skype for Business module.