Skip to content

Latest commit

 

History

History
212 lines (154 loc) · 8.53 KB

File metadata and controls

212 lines (154 loc) · 8.53 KB
title teamsAppInstallation: upgrade
description Update an app installed in a chat and bring it in sync with the current version available in the tenant app catalog.
author subray
ms.localizationpriority high
ms.subservice teams
doc_type apiPageType
ms.date 04/05/2024

teamsAppInstallation: upgrade

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Upgrade an app installation within a chat.

Note:

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

[!INCLUDE national-cloud-support]

Permissions

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.ReadWriteSelfForChat, TeamsAppInstallation.ReadWriteForChat, TeamsAppInstallation.ReadWriteSelfForChat.All, and TeamsAppInstallation.ReadWriteForChat.All permissions can't be used to install apps that require consent to resource-specific permissions.
  • The Chat.Manage.Chat permission uses resource-specific consent.

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 more 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 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.

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/beta/chats/19:ea28e88c00e94c7786b065394a61f296@thread.v2/installedApps/NjRiOWM3NDYtYjE1NS00MDQyLThkNDctOTQxYmQzODE2ODFiIyMwZDgyMGVjZC1kZWYyLTQyOTctYWRhZC03ODA1NmNkZTdjNzg=/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]


Response

The following example shows the response.

HTTP/1.1 204 No Content

Example 2: Upgrade app installed in a chat and consent to the resource specific permissions

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

Request

The following example shows a request.

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

[!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]


Response

The following example shows the response.

HTTP/1.1 204 No Content

Related content