| title | teamsAppInstallation: upgrade |
|---|---|
| description | Upgrade an app installation in a team. |
| author | akjo |
| ms.localizationpriority | medium |
| ms.subservice | teams |
| doc_type | apiPageType |
| ms.date | 04/18/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Upgrade an app installation in a team to the latest version of the app.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
Note
- The
TeamsAppInstallation.ReadWriteSelfForTeam,TeamsAppInstallation.ReadWriteForTeampermissions,TeamsAppInstallation.ReadWriteSelfForTeam.All, andTeamsAppInstallation.ReadWriteForTeam.Allpermissions can't be used to install apps that require consent to resource-specific consent permissions. - The
Group.ReadWrite.AllandDirectory.ReadWrite.Allpermissions are supported only for backward compatibility. We recommend that you update your solutions to use an alternative permission and avoid using these permissions going forward. - The
TeamsAppInstallation.ManageSelectedForTeam.Allis the least privileged application permission required to install or upgrade a Teams app that requires consent to resource-specific consent (RSC) permissions.
POST /teams/{team-id}/installedApps/{app-installation-id}/upgrade| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
In the request body, supply a JSON representation of the parameters.
The following table shows more parameters that can be used with the upgrade action.
| Parameter | Type | Description |
|---|---|---|
| consentedPermissionSet | teamsAppPermissionSet | Set of resource specific permissions that are being consented. |
Note: The permissions consented to during the upgrade must be the same as the resource-specific permissions present in the teamsAppDefinition of the app. To get the application and delegated resource-specific permissions, see Example 7. If only delegated resource-specific permissions are present in teamsAppDefinition, permissions can be omitted in the body of this request.
If successful, this method returns 204 No Content response code. It doesn't return anything in the response body.
POST https://graph.microsoft.com/beta/teams/db5e04be-daa2-4a35-beb1-5e73cc381599/installedApps/NjkwM2ZhOTMtNjA1Yi00M2VmLTkyMGUtNzdjNDcyOWY4MjU4IyMwMjQwYTM2OC0yNWUwLTQ1NjktOGViZS0xMzYwMWNiNTVhMTg=/upgrade
{
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No ContentExample 2: Upgrade app installed in a team and consent to the resource-specific permissions required by the app
To get the list of resource-specific permissions required by the app, get the app from appCatalog, as shown in Example 7.
POST https://graph.microsoft.com/beta/teams/20988f0f-a647-42f6-be30-79e04de3c2ed/installedApps/MjA5ODhmMGYtYTY0Ny00MmY2LWJlMzAtNzllMDRkZTNjMmVkIyNmYTkzN2Y4OS1iYWNhLTQ5NzktYmY4YS00MmY5ODE5MWY3ODA=/upgrade
Content-Type: application/json
{
"consentedPermissionSet": {
"resourceSpecificPermissions": [
{
"permissionValue": "Channel.Create.Group",
"permissionType": "application"
},
{
"permissionValue": "ChannelMeeting.ReadBasic.Group",
"permissionType": "delegated"
}
]
}
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
HTTP/1.1 204 No Content