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.
Create a new agent identity blueprint object if it doesn't exist, or update the properties of an existing object.
Important
Using PATCH to set passwordCredential is not supported. Use the addPassword and removePassword methods to update the password or secret for an agent identity blueprint.
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 permission | Higher privileged permissions |
|---|---|---|
| Delegated (work or school account) | AgentIdentityBlueprint.ReadWrite.All | Directory.ReadWrite.All |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | AgentIdentityBlueprint.ReadWrite.All | Directory.ReadWrite.All |
Important
The AgentIdentity* permissions are currently unavailable for consent through the API permissions experience on the Microsoft Entra admin center. To use these permissions, you can consent to them through Microsoft Graph API calls as described in Grant or revoke API permissions programmatically. See Permissions for managing agent identities for more information about these permissions.
When using delegated permissions, the authenticated user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation.
- Agent ID Administrator.
- Agent ID Developer - Create agent identity blueprints. The principal with this role is assigned ownership of the blueprint they create and can perform write operations on that blueprint.
HTTP request
To create or update an application, specify the uniqueName client-provided alternate key.
PATCH /applications(uniqueName='{uniqueName}')/microsoft.graph.agentIdentityBlueprint
Request headers
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
| Prefer | create-if-missing. Required for upsert behavior, otherwise the request is treated as an update operation. |
Request body
In the request body, supply a JSON representation of the agentIdentityBlueprint object. The request body must contain displayName, which is a required property. Specify other writable properties as necessary for your agentIdentityBlueprint, for creation or update.
Response
If an object with uniqueName doesn't exist, this method returns a 201 Created response code and a new agent identity blueprint object in the response body. The agent identity blueprint is assigned the uniqueName value.
If an object with uniqueName doesn't exist and the Prefer: create-if-missing header is not specified, this method returns a 404 Not Found error code.
If an application object with uniqueName already exists, this method updates the object and returns a 204 No Content response code.
Examples
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/applications(uniqueName='app-65278')/microsoft.graph.agentIdentityBlueprint
Content-Type: application/json
Prefer: create-if-missing
{
"displayName": "Display name"
}
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 201 Created
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#applications/$entity",
"id": "03ef14b0-ca33-4840-8f4f-d6e91916010e",
"deletedDateTime": null,
"appId": "631a96bc-a705-4eda-9f99-fdaf9f54f6a2",
"identifierUris": [],
"createdDateTime": "2019-09-17T19:10:35.2742618Z",
"displayName": "Display name",
"groupMembershipClaims": null,
"optionalClaims": null,
"publisherDomain": "contoso.onmicrosoft.com",
"signInAudience": "AzureADandPersonalMicrosoftAccount",
"tags": [],
"tokenEncryptionKeyId": null,
"api": {
"requestedAccessTokenVersion": 2,
"acceptMappedClaims": null,
"knownClientApplications": [],
"oauth2PermissionScopes": [],
"preAuthorizedApplications": []
},
"appRoles": [],
"info": {
"termsOfServiceUrl": null,
"supportUrl": null,
"privacyStatementUrl": null,
"marketingUrl": null,
"logoUrl": null
},
"keyCredentials": [],
"passwordCredentials": [],
"uniqueName": "app-65278",
"web": {
"redirectUris": [],
"homePageUrl": null,
"logoutUrl": null,
"implicitGrantSettings": {
"enableIdTokenIssuance": false,
"enableAccessTokenIssuance": false
}
},
}