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.
Namespace: microsoft.graph
Important
APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Update the properties of an agentInstance object. You can also update the agentCardManifest associated with the agent instance by including the manifest in the request body.
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) | AgentInstance.ReadWrite.All | Not available. |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | AgentInstance.ReadWrite.All | AgentInstance.ReadWrite.ManagedBy |
Important
When using delegated permissions, the authenticated user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. Agent Registry Administrator is the least privileged role supported for this operation.
HTTP request
PATCH /agentRegistry/agentInstances/{agentInstanceId}
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 only the values for properties to update. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values.
The following table specifies the properties that can be updated.
| Property | Type | Description |
|---|---|---|
| ownerIds | String collection | List of owner identifiers for the agent instance, can be users or service principals. Required. |
| managedBy | String | Application identifier managing this agent. Optional. |
| originatingStore | String | Name of the store/system where agent originated. Optional. |
| createdBy | String | User who created the agent instance (read-only). Optional. |
| displayName | String | Display name for the agent instance. Required. |
| sourceAgentId | String | Original agent identifier from source system. Optional. |
| agentIdentityBlueprintId | String | Agent identity blueprint identifier. Optional. |
| agentIdentityId | String | Entra agent identity identifier. Optional. |
| agentUserId | String | User identifier associated with the agent. Optional. |
| createdDateTime | DateTimeOffset | Timestamp when agent instance was created (read-only). Optional. |
| lastModifiedDateTime | DateTimeOffset | Timestamp of last modification (read-only). Optional. |
| url | String | Endpoint URL for the agent instance. Optional. |
| preferredTransport | String | Preferred transport protocol (JSONRPC, GRPC, HTTP+JSON). Optional. |
| additionalInterfaces | agentInterface collection | Additional interfaces/transports supported by the agent (url, transport). Optional. |
| signatures | agentCardSignature collection | Digital signatures for the agent instance (protected, signature, header). Optional. |
Response
If successful, this method returns a 200 OK response code and an updated agentInstance object in the response body.
Examples
Example 1: Update the agentCardManifest in an agentInstance
Request
The following example shows a request. The request also creates the agentCardManifest if it does not already exist.
PATCH https://graph.microsoft.com/beta/agentRegistry/agentInstances/{agentInstanceId}
Content-Type: application/json
{
"agentCardManifest": {
"ownerIds": [
"0ef68a76-e247-41dd-947b-41282760a2ac"
],
"originatingStore": "Copilot Studio",
"displayName": "Conditional Access Agent Card",
"description": "Manages organizational conditional access policies",
"iconUrl": "https://example.com/icon.png",
"provider": {
"organization": "Test Organization",
"url": "https://test.com"
},
"protocolVersion": "1.0",
"version": "1.0.0",
"documentationUrl": "https://example.com/docs",
"capabilities": {
"streaming": false,
"pushNotifications": false,
"stateTransitionHistory": true,
"extensions": [
{
"uri": "https://contoso.example.com/a2a/capabilities/secureMessaging",
"description": null,
"required": false,
"params": {
"useHttps": true
}
}
]
},
"defaultInputModes": [
"application/json"
],
"defaultOutputModes": [
"application/json",
"text/html"
],
"supportsAuthenticatedExtendedCard": true,
"skills": [
{
"id": "threat-detection",
"displayName": "Threat Detection",
"description": "Detect security threats in real-time",
"tags": [
"security",
"threat",
"detection"
],
"examples": [
"Analyze this log for threats",
"Check for malware"
],
"inputModes": [
"application/json",
"text/plain"
],
"outputModes": [
"application/json",
"text/html"
]
}
]
}
}
Response
The following example shows the response.
HTTP/1.1 204 No Content
Example 2: Update an agentInstance to reference an existing agentCardManifest
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/agentRegistry/agentInstances/{agentInstanceId}
Content-Type: application/json
{
"agentCardManifest@odata.bind": "https://graph.microsoft.com/beta/agentRegistry/agentCardManifests('employee-assistant')"
}
Response
The following example shows the response.
HTTP/1.1 204 No Content
Example 3: Update displayName
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/agentRegistry/agentInstances/{agentInstanceId}
Content-Type: application/json
{
"displayName": "Teams Meeting Scheduler Agent"
}
Response
The following example shows the response.
HTTP/1.1 204 No Content