agent_id visible in tokens and logs across multiple clients, such as separate clients per environment or region.
The agent_id is stored on the client object, and associations are managed dynamically.
Once you associate an agent with a client, tokens issued to that client carry the agent’s identity as the subject (sub) for client credentials grants, or as the actor (act) for token exchange and standard login flows. To learn more, read Agent Identity in Tokens.
The internal
agent_id remains the identifier used to manage the agent through the Management API, regardless of whether you’ve set an external_agent_id.Associate a client at creation
Set theagent_id when creating a client via POST /api/v2/clients:
agent_id you set.
Retrieve the agent-associated client
Once you’ve associated anagent_id with a client, make a GET request to /api/v2/clients/{id} to return the client object:
agent_id you set.
Associate an existing client
You can associate an existing client using the Auth0 Dashboard or Management API.- Auth0 Dashboard
- Management API
- Navigate to Dashboard > Agents, select the agent, and then the agent’s Applications tab.
- Select Add Application and select the applications you want to associate with the agent in the modal. You can select multiple applications.
- Select Add Applications.
Remove the agent association
To dissociate a client from its agent, setagent_id to null via PATCH /api/v2/clients/{id}:
Next steps
- Learn about how Auth0 embeds agent identity in tokens