Bewerken

Update Copilot package

Important

APIs under the /beta version are subject to change. Use of these APIs in production applications is not supported.

Update a copilotPackageDetail object.

Important

Access to the Package Management API requires a Microsoft Agent 365 license.

This API is available in the following national cloud deployments.

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

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.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) CopilotPackages.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application CopilotPackages.ReadWrite.All Not available.

HTTP request

PATCH https://graph.microsoft.com/beta/copilot/admin/catalog/packages/{id}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of a copilotPackageDetail object.

The following properties can be updated.

Property Type Description
allowedUsersAndGroups packageAccessEntity collection Users/groups for whom the package is available.
acquireUsersAndGroups packageAccessEntity collection Users/groups for whom the package is deployed.

Response

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

Example

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/copilot/admin/catalog/packages/P_19ae1zz1-56bc-505a-3d42-156df75a4xxy
Content-Type: application/json

{
  "allowedUsersAndGroups": [
    {
      "resourceType": "user",
      "resourceId": "5d9fa31e-626e-45fb-b6e7-d8f1f11933a9"
    },
    {
      "resourceType": "group",
      "resourceId": "65d7d8fb-1e24-4ba8-92cd-8c502d830113"
    }
  ],
  "acquireUsersAndGroups": [
    {
      "resourceType": "user",
      "resourceId": "5d9fa31e-626e-45fb-b6e7-d8f1f11933a9"
    },
    {
      "resourceType": "group",
      "resourceId": "65d7d8fb-1e24-4ba8-92cd-8c502d830113"
    }
  ]
}

Response

The following example shows the response.

HTTP/1.1 204 No Content