|
| 1 | +--- |
| 2 | +title: "Get agentIdentity" |
| 3 | +description: "Read the properties and relationships of agentIdentity object." |
| 4 | +author: "zallison22" |
| 5 | +ms.date: 02/26/2026 |
| 6 | +ms.localizationpriority: medium |
| 7 | +ms.subservice: "entra-agent-id" |
| 8 | +doc_type: apiPageType |
| 9 | +--- |
| 10 | + |
| 11 | +# Get agentIdentity |
| 12 | + |
| 13 | +Namespace: microsoft.graph |
| 14 | + |
| 15 | +Read the properties and relationships of [agentIdentity](../resources/agentidentity.md) object. |
| 16 | + |
| 17 | +## Permissions |
| 18 | + |
| 19 | +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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference). |
| 20 | + |
| 21 | +<!-- { |
| 22 | + "blockType": "permissions", |
| 23 | + "name": "agentidentity-get-permissions" |
| 24 | +} |
| 25 | +--> |
| 26 | +[!INCLUDE [permissions-table](../includes/permissions/agentidentity-get-permissions.md)] |
| 27 | + |
| 28 | +[!INCLUDE [rbac-agentid-apis-write](../includes/rbac-for-apis/rbac-agentid-apis-write.md)] |
| 29 | + |
| 30 | +## HTTP request |
| 31 | + |
| 32 | +```http |
| 33 | +GET /servicePrincipals/{id}/microsoft.graph.agentIdentity |
| 34 | +``` |
| 35 | + |
| 36 | +## Optional query parameters |
| 37 | + |
| 38 | +This method supports the `$select` and `$expand` [OData query parameters](/graph/query-parameters) to help customize the response. |
| 39 | + |
| 40 | +## Request headers |
| 41 | + |
| 42 | +| Name | Description | |
| 43 | +|:---------------|:---------------------------| |
| 44 | +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| |
| 45 | + |
| 46 | +## Request body |
| 47 | + |
| 48 | +Don't supply a request body for this method. |
| 49 | + |
| 50 | +## Response |
| 51 | + |
| 52 | +If successful, this method returns a `200 OK` response code and an [agentIdentity](../resources/agentidentity.md) object in the response body. |
| 53 | + |
| 54 | +## Examples |
| 55 | + |
| 56 | +### Request |
| 57 | + |
| 58 | +The following example shows a request. |
| 59 | +<!-- { |
| 60 | + "blockType": "request", |
| 61 | + "name": "get_agentidentity" |
| 62 | +} |
| 63 | +--> |
| 64 | +``` http |
| 65 | +GET https://graph.microsoft.com/v1.0/servicePrincipals/{id}/microsoft.graph.agentIdentity |
| 66 | +``` |
| 67 | + |
| 68 | +### Response |
| 69 | + |
| 70 | +The following example shows the response. |
| 71 | +>**Note:** The response object shown here might be shortened for readability. |
| 72 | +<!-- { |
| 73 | + "blockType": "response", |
| 74 | + "truncated": true, |
| 75 | + "@odata.type": "microsoft.graph.agentIdentity" |
| 76 | +} |
| 77 | +--> |
| 78 | +``` http |
| 79 | +HTTP/1.1 200 OK |
| 80 | +Content-Type: application/json |
| 81 | +
|
| 82 | +{ |
| 83 | + "id": "1b7313c4-05d0-4a08-88e3-7b76c003a0a2", |
| 84 | + "displayName": "My Agent Identity", |
| 85 | + "createdDateTime": "2019-09-17T19:10:35.2742618Z", |
| 86 | + "createdByAppId": "00001111-aaaa-2222-bbbb-3333cccc4444", |
| 87 | + "agentIdentityBlueprintId": "00001111-aaaa-2222-bbbb-3333cccc4444", |
| 88 | + "accountEnabled": true, |
| 89 | + "disabledByMicrosoftStatus": null, |
| 90 | + "servicePrincipalType": "ServiceIdentity", |
| 91 | + "tags": [] |
| 92 | +} |
| 93 | +``` |
0 commit comments