teamsAppInstallation in chat: upgrade

Namespace: microsoft.graph

Upgrade an app installation within a chat.

Notes:

  • If the chat is associated with an onlineMeeting instance, then effectively, the teamsApp installed in the meeting will get upgraded.

This API is supported 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.ReadWriteSelfForChat1, TeamsAppInstallation.ReadWriteForChat1, TeamsAppInstallation.ReadWriteAndConsentSelfForChat, TeamsAppInstallation.ReadWriteAndConsentForChat
Delegated (personal Microsoft account) Not supported.
Application TeamsAppInstallation.ReadWriteSelfForChat.All1, TeamsAppInstallation.ReadWriteForChat.All1, TeamsAppInstallation.ReadWriteAndConsentSelfForChat.All, TeamsAppInstallation.ReadWriteAndConsentForChat.All

Notes:
1 These permissions cannot be used to install apps that require consent to resource-specific permissions.

HTTP request

POST /chats/{chat-id}/installedApps/{app-installation-id}/upgrade

Request body

In the request body, supply a JSON representation of the parameters.

The following table lists additional parameters that can be used with the upgrade action.

Parameter Type Description
consentedPermissionSet teamsAppPermissionSet The set of resource-specific permissions that are being consented to.

Note: The permissions consented to during the installation must match the resource-specific permissions defined 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 a 204 No Content response code.

Examples

Example 1: Upgrade the teams app installed in chat

Request

The following example upgrades an app installed in a chat.

POST https://graph.microsoft.com/v1.0/chats/19:ea28e88c00e94c7786b065394a61f296@thread.v2/installedApps/NjRiOWM3NDYtYjE1NS00MDQyLThkNDctOTQxYmQzODE2ODFiIyMwZDgyMGVjZC1kZWYyLTQyOTctYWRhZC03ODA1NmNkZTdjNzg=/upgrade

{

}

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/chats/19:ea28e88c00e94c7786b065394a61f296@thread.v2/installedApps/NjRiOWM3NDYtYjE1NS00MDQyLThkNDctOTQxYmQzODE2ODFiIyMwZDgyMGVjZC1kZWYyLTQyOTctYWRhZC03ODA1NmNkZTdjNzg=/upgrade
Content-Type: application/json

{
  "consentedPermissionSet": {
      "resourceSpecificPermissions": [
      {
        "permissionValue": "OnlineMeeting.ReadBasic.Chat",
        "permissionType": "Delegated"
      },
      {
        "permissionValue": "ChatMember.Read.Chat",
        "permissionType": "Application"
      }]
    }
}

Response

HTTP/1.1 204 No Content

See also