
Announcements
Hi Community,
I hope someone may have some suggestions to the following issue. I have a Power Automate flow to provision new teams in MS Teams, and there is a requirement to add PowerApps as a tab and connect it to a specific app.
This is done using this endpoint (via a custom connector):
https://graph.microsoft.com/v1.0/teams/{teamId}/channels/{ChannelId}/tabs
Payload:
{
"displayName": "PowerApps as App tab",
"teamsApp@odata.bind": "https://graph.microsoft.com/beta/appCatalogs/teamsApps/{PowerAppAppID}",
"configuration": {
"entityId": "/providers/Microsoft.PowerApps/apps/{MyAppId}",
"contentUrl": "https://apps.powerapps.com/play/providers/Microsoft.PowerApps/apps/{MyAppId}?source=teamstab&locale={locale}",
"websiteUrl": "https://apps.powerapps.com/play/providers/Microsoft.PowerApps/apps/{MyAppId}?source=teamsopenwebsite"
}
}
The error message "App id {PowerAppAppID} needs to be installed to the scope {MyAppId}:{ChannelId} and be in an unblocked state to install/update a tab" indicates that the Power Apps app must be pre-installed in the team before you can add it as a tab.
Since you’re provisioning new teams programmatically, you need to install the Power Apps app first before adding the tab. Here's how you can do it:
Before adding the tab, you must install the Power Apps application in the team. You can do this via Microsoft Graph API using the following steps:
Use the Graph API to install the Power Apps app in the team before attempting to add the tab.
POST Request
Payload
{PowerAppsAppId} with the Teams App ID for Power Apps.After installing the app, you must wait a few seconds before adding the tab. You can do this by:
To verify installation, use:
Check if Power Apps appears in the response.
Once the Power Apps app is installed, you can use your existing POST request to add the tab.
Make sure the payload contains:
MyAppId).Create a Power Automate flow that:
Use a Custom Connector for the Graph API requests.
If you're provisioning similar teams frequently, consider Teams Templates:
You need to install the Power Apps app first before adding it as a tab. This can be done via:
This should fully automate the process and remove the manual steps.