Bad gateway error when installing teams custom app to team in migration mode
Hi All,
I am currently writing a migration solution to import content from an external messaging platform into Microsoft Teams. As part of this I am required to use a custom teams app with RSC permissions to handle part of the migration of content.
However I have found that when I go to install my app through the Graph API (I need to do it this way as the team is hidden in the UI while in migration mode) I get a 502 bad gateway error (See my request below).
https://graph.microsoft.com/v1.0/teams/38f635f9-7233-4830-be27-3738ea170210/installedApps
{
"******@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/53d4eb15-0193-4d6d-8665-9596a3f34fcd",
"consentedPermissionSet": {
"resourceSpecificPermissions": [
{
"permissionValue": "Channel.Create.Group",
"permissionType": "application"
},
{
"permissionValue": "ChannelSettings.ReadWrite.Group",
"permissionType": "application"
}
]
}
}
However I found out that when I take the team out of migration mode and re-send the request I get a conflict error. This lead me to test the same install request in the non migration mode team which produces the correct 201 created response.
After learning this I started my tests again in migration mode which showed that the app is installed despite the 502 error, I confirmed this using this endpoint.
https://graph.microsoft.com/v1.0/teams/02bd9fd6-8f93-4758-87c3-1fb73740a315/installedApps?$expand=teamsAppDefinition
By continuing my tests I was able to also validate that I could migrate the messages despite the 502 Bad Gateway error.
Therefore my question would be is this expected behaviour or is this a bug? I have attached the Azure permissions and my app manifest in the hopes that others can replicate and confirm.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"version": "1.0.3",
"manifestVersion": "1.16",
"id": "02bb48e8-541a-416a-8f30-d95a4f9b8850",
"packageName": "com.package.name",
"name": {
"short": "Cameron App",
"full": "Camerons RSC App"
},
"developer": {
"name": "Redacted",
"mpnId": "",
"websiteUrl": "Redacted",
"privacyUrl": "Redacted",
"termsOfUseUrl": "Redacted"
},
"description": {
"short": "A sample app to test the RSC Permissions",
"full": "This app will test the RSC Permissions Associated with a teams"
},
"icons": {
"outline": "outline.png",
"color": "color.png"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "1d94d4d2-9ea1-45c9-aaa0-4eab461189ff",
"scopes": [
"team"
],
"isNotificationOnly": false,
"supportsCalling": false,
"supportsVideo": false,
"supportsFiles": false
}
],
"validDomains": [],
"webApplicationInfo": {
"id": "15dfdb81-2552-4c82-95ac-9bef344e7646",
"resource": ""
},
"defaultGroupCapability": {
"team": "bot",
"groupchat": "bot",
"meetings": "bot"
},
"authorization": {
"permissions": {
"resourceSpecific": [
{
"name": "Channel.Create.Group",
"type": "Application"
},
{
"name": "ChannelSettings.ReadWrite.Group",
"type": "Application"
}
]
}
},
"supportedChannelTypes": [
"sharedChannels",
"privateChannels"
]
}