| 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 |
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]
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.
POST /appCatalogs/teamsApps/{id}/appDefinitions| 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. |
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/zip. Required. |
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.
If successful, this method returns a 204 No Content response code.
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.
The following example shows the response.
HTTP/1.1 204 No ContentExample 2: Update a new version of an existing app for admin review before publication in the current tenant catalog
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]
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"
}