teamsAppInstallation in a team: upgrade

Namespace: microsoft.graph

Upgrade an app installation in a team to the latest version of the app.

Note:

  • Currently, upgrading an app that requires resource-specific consent permissions is not supported in an application context.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) TeamsAppInstallation.ReadWriteSelfForTeam1, TeamsAppInstallation.ReadWriteForTeam1, TeamsAppInstallation.ReadWriteAndConsentForTeam, TeamsAppInstallation.ReadWriteAndConsentSelfForTeam, Group.ReadWrite.All2, Directory.ReadWrite.All2
Delegated (personal Microsoft account) Not supported.
Application TeamsAppInstallation.ReadWriteSelfForTeam.All1, TeamsAppInstallation.ReadWriteForTeam.All1, TeamsAppInstallation.ReadWriteAndConsentForTeam.All, TeamsAppInstallation.ReadWriteAndConsentSelfForTeam.All, Group.ReadWrite.All2, Directory.ReadWrite.All2

Note:
1 These permissions cannot be used to install apps that require consent to resource-specific consent permissions.
2 These permissions 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.

HTTP request

POST /teams/{team-id}/installedApps/{app-installation-id}/upgrade

Request headers

Header Value
Authorization Bearer {token}. Required.

Request body

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 installation must match the resource-specific permissions specified 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 specified in the teamsAppDefinition, permissions can be omitted in the request body.

Response

If successful, this method returns 204 No Content response code. It doesn't return anything in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/teams/db5e04be-daa2-4a35-beb1-5e73cc381599/installedApps/NjkwM2ZhOTMtNjA1Yi00M2VmLTkyMGUtNzdjNDcyOWY4MjU4IyMwMjQwYTM2OC0yNWUwLTQ1NjktOGViZS0xMzYwMWNiNTVhMTg=/upgrade

{

}

Response

The following example shows the response.

HTTP/1.1 204 No Content

To get the list of resource-specific permissions required by the app, get the app from appCatalog, as shown in Example 7.

Request

POST https://graph.microsoft.com/v1.0/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"
      }
    ]
  }
}

Response

HTTP/1.1 204 No Content

See also