Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Pages Menu
TwitterRssFacebook

Posted by on Jul 30, 2020 in Development, Microsoft Teams

It’s now much easier to send proactive bot messages to Microsoft Teams users, thanks to new permissions

It’s now much easier to send proactive bot messages to Microsoft Teams users, thanks to new permissions

Sending pro-active messages to users has also been a bit tricky in Microsoft Teams. Because bot messages are delivered via the Bot Framework, there wasn’t a good model for pro-active delivery where the user hadn’t already initiated a conversation with a bot.

There were a few workarounds, but it was always a bit messy because it required the user to install an app first. The whole point of proactive messaging is to reach users that aren’t interacting with your application, so they’re also unlikely to install your application.

Now, however, there are new Microsoft Graph permissions to help you out. A very specific permission can be granted to an application, which will let that application install itself for a user, or a team. This is different from a wide permission allow any application to be installed – instead this is scoped just to the application in question.

There are now two new permissions in Graph:

TeamsAppInstallation.ReadWriteSelfForUser.All - Allows a Teams app to read, install, upgrade, and uninstall itself for any user, without prior sign in or use.

TeamsAppInstallation.ReadWriteSelfForTeam.All - Allows a Teams app to read, install, upgrade, and uninstall itself in any team, without prior sign in or use.

Both of these permissions work in the same way.  You should first see whether the user/team you want to send to already has your app installed. You can do this with a GET request.

Then, assuming it isn’t, send a POST request to install your app. Note that you only need the scoped permission above now, not the full User.ReadWrite.All, Directory.ReadWrite.All previously required.

There’s more information on doing this, with some sample Graph calls, on the Microsoft Docs page: Enable proactive bot installation and proactive messaging in Teams with Microsoft Graph


As a Microsoft Teams developer, it’s really good to see Microsoft introducing more scoped permissions. It makes deploying applications easier and enables scenarios like proactive messaging.

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

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

Share to Microsoft Teams