ערוך

שתף באמצעות


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

Add to Teams

  1. Sign in to Power Apps, and then select Apps.

  2. Select More actions (...) for the app you want to share in Teams, and then select Add to Teams.

    Add to Teams.

    Add to Teams panel opens on the right-side of the screen.

    Add to Teams - review options.

  3. (Optional) If the app doesn't have any description, select Edit details to open the app in Power Apps Studio to add.

  4. (Optional) Select Advanced settings to add additional details such as Name, Website, Terms of Use, Privacy Policy, MPN ID (Microsoft Partner Network ID).

    Add additional details.

  5. Select Add to Teams and you'll be asked to open Teams.

    Add to Teams button.

    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.

  6. Select Open Microsoft Teams to open Teams app, or select Cancel followed by Use the web app instead to open Teams web.

  7. 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.

    Add app to Teams, a team, or a 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.

  1. Go to Power Apps > Apps > select the app to launch in a new browser tab.

  2. Edit the app > select Play the app. or press F5 to play the app.

  3. After the app is open using the web player, choose the Add to Teams button from the top-right side of the screen.

    Add app to Teams using web player.

  4. When prompted, select Cancel.

  5. 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

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.

See also

Welcome to Microsoft Teams