Skip to content

Latest commit

 

History

History
82 lines (58 loc) · 2.82 KB

File metadata and controls

82 lines (58 loc) · 2.82 KB
title Update agentIdentity
description Update an agent identity .
author zallison22
ms.date 02/26/2026
ms.localizationpriority medium
ms.subservice entra-agent-id
doc_type apiPageType

Update agentIdentity

Namespace: microsoft.graph

[!INCLUDE national-cloud-support]

Update the properties of an agentIdentity object.

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.

[!INCLUDE permissions-table]

[!INCLUDE rbac-agentid-apis-write]

Permissions for specific scenarios

  • To update the customSecurityAttributes property:
    • In delegated scenarios, the admin must be assigned the Attribute Assignment Administrator role and the app granted the CustomSecAttributeAssignment.ReadWrite.All and AgentIdentity.ReadWrite.All delegated permissions.
    • In app-only scenarios using Microsoft Graph permissions, the app must be granted the CustomSecAttributeAssignment.ReadWrite.All application permission.

HTTP request

PATCH /servicePrincipals/{id}/microsoft.graph.agentIdentity

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 the values for relevant fields that should be updated. Existing properties that aren't included in the request body maintains their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.

Response

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

For information about errors returned by agent identity APIs, see Agent identity error codes.

Examples

Request

The following example shows a request.

PATCH https://graph.microsoft.com/v1.0/servicePrincipals/{id}/microsoft.graph.agentIdentity
Content-type: application/json

{
  "displayName": "My New Name"
}

Response

The following example shows the response.

HTTP/1.1 204 No Content