A cloud-based identity and access management service for securing user authentication and resource access
AgentIdUser.ReadWrite.IdentityParentedBy by itself is not always sufficient.
For delegated access with a work or school account, the signed-in admin must also be assigned a supported Microsoft Entra role. The least-privileged supported role for creating an agentUser is Agent ID Administrator. If the token has the Graph permission but the signed-in admin lacks that role, Microsoft Graph can return Authorization_RequestDenied with Insufficient privileges to complete the operation.
Also verify these requirements:
- The request is sent to:
POST /users/microsoft.graph.agentUser - The token is for Microsoft Graph and includes the required permission.
- The request body includes all required properties:
-
accountEnabled -
displayName -
mailNickname -
userPrincipalName -
identityParentId
-
- If using
userPrincipalName, its domain must be one of the tenant’s verified domains. - Each
identityParentIdcan be linked to only oneagentUser. If it is already linked, the documented error is400 Bad Request, not a privilege error.
A valid example request is:
POST https://graph.microsoft.com/v1.0/users/microsoft.graph.agentUser
Content-type: application/json
{
"accountEnabled": true,
"displayName": "Sales Agent",
"mailNickname": "SalesAgent",
"userPrincipalName": "******@contoso.com",
"identityParentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
If the client is creating agents’ user accounts by using the agent identity blueprint, that blueprint must be granted the application permission AgentIdUser.ReadWrite.IdentityParentedBy in the tenant. If a different client is used, that client needs AgentIdUser.ReadWrite.All delegated or application permission instead.