Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
APIs under the /beta version are subject to change. Use of these APIs in production applications is not supported.
Create a new custom copilotPackagePolicyTemplate by copying the bound source on the server. The source isn't changed.
This proposed contract requires matching schema and receiving-service qualification; neither delegated nor application execution is established by the declaration alone.
Copy preserves source settings and metadata not exposed by public reads. Reconstructing a template from its public projection isn't equivalent. The source comes from the bound route, not another body identifier; the new template's ID is generated by the server. Collection create isn't supported.
Important
Access to the Package Management API requires a Microsoft Agent 365 license.
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. |
Applicable tenant authority and receiving-service support are required separately from permission metadata.
HTTP request
POST https://graph.microsoft.com/beta/copilot/admin/catalog/policyTemplates/{policyTemplateId}/copy
Request headers
| Name | Description |
|---|---|
Authorization |
Bearer token. Required. Learn more about authentication and authorization. |
Content-Type |
application/json. Required. |
Request body
| Parameter | Type | Description |
|---|---|---|
description |
String | Optional and nullable. Omission copies the source description; explicit null clears it on the new template. |
displayName |
String | Required. Non-null, nonempty display name of the new custom template. |
policyConfiguration |
copilotPackagePolicyConfiguration | Optional and nullable. Omit or supply null to copy the raw source configuration. A non-null object is a strictly validated complete replacement, not an overlay. |
The null-configuration behavior differs from Update, which rejects explicit null. A supplied replacement must contain all applicable mandatory families and every required choice within a selected family. Default and optional families may be omitted. An explicit empty selected set is allowed only when no applicable mandatory family exists.
Response
If successful, this method returns 200 OK and one newly created copilotPackagePolicyTemplate, with a new server-generated id. It isn't a collection, 201 Created, or a promised Location header contract.
Copy isn't idempotent. After a timeout or uncertain result, reconcile whether a new template was created before another attempt; don't blindly retry or assume rollback.
Example
This illustrative request clears the new description and inherits the source configuration. The illustrative source is verified as unconfigured, so the returned configuration is null.
Request
POST https://graph.microsoft.com/beta/copilot/admin/catalog/policyTemplates/example-unconfigured-template/copy
Content-Type: application/json
{
"displayName": "Example copied template",
"description": null
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "example-new-template",
"displayName": "Example copied template",
"description": null,
"policyConfiguration": null
}