Skip to content

Latest commit

 

History

History
174 lines (121 loc) · 6.2 KB

File metadata and controls

174 lines (121 loc) · 6.2 KB
title Update teamsApp
description Update an app previously published to a Teams app catalog.
author MSFTRickyCastaneda
ms.localizationpriority medium
ms.subservice teams
doc_type apiPageType
ms.date 09/16/2024

Update teamsApp

Namespace: microsoft.graph

Update an app previously published to the Microsoft Teams app catalog. To update an app, the distributionMethod property for the app must be set to organization.

This API specifically updates an app published to your organization's app catalog (the tenant app catalog).

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

  • Only Teams Service admins or a higher privileged role can call this API.

[!INCLUDE permissions-table]

Note

  • The Directory.ReadWrite.All permission is supported only for backward compatibility. We recommend that you update your solutions to use an alternative permission listed in the previous table and avoid using these permissions going forward.

HTTP request

POST /appCatalogs/teamsApps/{id}/appDefinitions

Query parameters

Property Type Description
requiresReview Boolean This optional query parameter triggers the app review process. Users with admin privileges can submit apps without triggering a review. If users want to request a review before publishing, they must set requiresReview to true. A user who has admin privileges can opt not to set requiresReview or set the value to false and the app is approved and immediately published.

Request headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/zip. Required.

Request body

In the request body, include a Teams zip manifest payload. For details, see Create an app package.

Note: Use the ID returned from the List published apps call to reference the app you'd like to update. Do not use the ID from the manifest of the zip app package.

Response

If successful, this method returns a 204 No Content response code.

Examples

Example 1: Update an application previously published to the Microsoft Teams app catalog

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/06805b9e-77e3-4b93-ac81-525eb87513b8/appDefinitions
Content-type: application/zip

app.zip

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


For details about the Teams application zip file, see Create app package.

Response

The following example shows the response.

HTTP/1.1 204 No Content

Example 2: Update a new version of an existing app for admin review before publication in the current tenant catalog

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/e3e29acb-8c79-412b-b746-e6c39ff4cd22/appDefinitions?requiresReview=true
Content-type: application/zip

app.zip

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

If successful, this method returns a 201 Created response code and the key-value pair "publishingState": "submitted" in the response body. For details, see teamsAppDefinition.

HTTP/1.1 201 Created
Location: https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/e3e29acb-8c79-412b-b746-e6c39ff4cd22/appDefinitions/MGQ4MjBlY2QtZGVmMi00Mjk3LWFkYWQtNzgwNTZjZGU3Yzc4IyMxLjAuMA==
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#appDefinition",
    "@odata.etag": "158749010",
    "id": "MGQ4MjBlY2QtZGVmMi00Mjk3LWFkYWQtNzgwNTZjZGU3Yzc4IyMxLjAuMA==",
    "teamsAppId": "e3e29acb-8c79-412b-b746-e6c39ff4cd22",
    "displayName": "Test app",
    "version": "1.0.11",
    "azureADAppId": "a651cc7d-ec54-4fb2-9d0e-2c58dc830b0b",
    "requiredResourceSpecificApplicationPermissions":[
         "ChannelMessage.Read.Group",
         "Channel.Create.Group",
         "Tab.ReadWrite.Group",
         "Member.Read.Group"
    ],
    "publishingState": "submitted",
    "lastModifiedDateTime": "2020-02-10 22:48:33.841"
}

Related content

Microsoft Graph service-specific throttling limits