Deeply integrate your apps in Microsoft Teams with context variables
Over the last several weeks, we have seen unprecedented growth of Power Apps within Microsoft Teams as companies transition to remote work. We’ve seen schools build apps for distance learning, organizations create apps to check temperatures, and many companies leverage the Crisis Communication solution that we blogged about a few weeks back, all within Microsoft Teams.
We have heard from many of you, however, that you’d like even deeper integration in Teams. To address that need, we’re releasing Teams context variables within Power Apps, which we mentioned briefly in the Wave 1 updates post.
With Teams context variables, you will have access to information like which channel, team, or group your app has been embedded in. With that information, you can now build apps that automatically filter down to relevant content or even pre-populate fields depending on which channel it is embedded in.
For example, in the app below, we’re able to automatically fill in the name and location of the customer since we know the app is inside of the Adventure Works channel. This saves valuable time as someone is inputting data within a form.
The most exciting context variable, however, is the sub entity ID, which allows a maker to deep link to a particular page of an app embedded inside of Teams. For example, you can use this new feature within the Crisis Communication solution to deep link directly to a news article from a Power Automate bot message. To learn how to make this adjustment to your Crisis Communication app, check out the step-by-step guide.
If you’re interested in using context variables and want to know what’s available, you can start by looking at the image below. The snapshot captures an app pulling all the variables it sees within a Teams channel so that you can get an idea what type of data you’ll get back from Teams. To get a full list of context variables, head on over to the Power Apps in Teams documentation.
Once you’re in the docs, you can also learn how to leverage the theme context variable to create apps that respond to the users selected theme, whether that be default, dark, or high contrast.
We’re excited to see what other use cases you all are able to come up with. As you do, please share in the comments below or in our community forums. In the meantime, the team will continue working hard to further deepen the integration between Teams and Power Apps.