Embed a canvas app as personal app in Teams
You can share an app you've created by embedding it directly into Microsoft Teams. When completed, users can select + to add your app to any of your team channels or conversations in the team you are in. The app appears as a tile under Tabs for your team.
Note
Team custom app policies must be set to allow uploading custom apps. If you are unable to embed your app in Teams, check with your administrator to see if they've setup custom app settings.
Prerequisites
- You need a valid Power Apps license.
- To embed an app into Teams, you need an existing app created using Power Apps.
Add to Teams
Sign in to Power Apps, and then select Apps.
Select More actions (...) for the app you want to share in Teams, and then select Add to Teams.
Add to Teams panel opens on the right-side of the screen.
(Optional) If the app doesn't have any description, select Edit details to open the app in Power Apps Studio to add.
(Optional) Select Advanced settings to add additional details such as Name, Website, Terms of Use, Privacy Policy, MPN ID (Microsoft Partner Network ID).
Select Add to Teams and you'll be asked to open Teams.
Tip
If you want, you can also choose Download app to download the app, and then use the steps described in Upload your app in Microsoft Teams article to upload the app to Teams.
Select Open Microsoft Teams to open Teams app, or select Cancel followed by Use the web app instead to open Teams web.
Select Add. You can also choose to add the app to a specific team using Add to team, or a specific chat using Add to chat.
The app is now added to Teams.
Tip
You can also pin the app for easy access.
Add to Teams using the web player
You can also add canvas apps to Teams using the web player.
Go to Power Apps > Apps > select the app to launch in a new browser tab.
Edit the app > select or press F5 to play the app.
After the app is open using the web player, choose the Add to Teams button from the top-right side of the screen.
When prompted, select Cancel.
Select Launch it now to open the Teams app. Alternatively, you can also choose Use the web app instead to open the app in Teams web.
Note
- To add canvas apps to Teams using the web player:
- Your organization must have Allow interaction with custom apps turned on. More information: Manage custom app policies and settings in Microsoft Teams
- Your organization must allow Shared Power Apps. More information: Manage Microsoft Power Platform apps in the Microsoft Teams admin center
- You can only add apps to Teams that belong to the same tenant as your Teams account. Otherwise, you'll see an error "App was not found in tenant".
Publish the app to the Teams catalog
If you're an admin, you can also publish the app to the Microsoft Teams catalog.
Use context from Teams
To build deeply integrated apps with Teams, you can use Team's context variables with the Param()
function. For example, use the following formula in screen's Fill property to change the background of app based on user's theme within Teams:
Switch(
Param("theme"),
"dark",
RGBA(
32,
31,
31,
1
),
"contrast",
RGBA(
0,
0,
0,
1
),
RGBA(
243,
242,
241,
1
)
)
To test the app, publish it and then play it within Teams.
The following context variables from Teams are supported:
- locale
- channelId
- channelType
- chatId
- groupId
- hostClientType
- subEntityId
- teamId
- teamType
- theme
- userTeamRole
Note
This feature was added in March, 2020. If you embedded your app within Teams before this, you may need to re-add your app to Teams to use this functionality.
Improve the performance of your app
You can optionally preload your app within Teams to increase performance. For mor information: Enable Preload app for enhanced performance.