Case 49C295 · AI security · L4 Advanced
Identity and Access for AI Agents
Interview questionAn AI agent will act for users across email, calendar and the CRM. How would you design its identity and access?
- 01 Answer
- 02 Example
- 03 Trade-offs
What a strong answer covers
Try it out loud first. Then check yourself:
- Give the agent its own identity, never a shared human or admin account, so every action is attributable and revocable.
- Use delegated access: OAuth on behalf of the user with scoped, short-lived tokens, so it can never exceed the user's rights.
- Least privilege per task: split read from write scopes, and require human approval for sends, deletes and payments.
- Keep tokens server-side, never in the prompt; log every tool call with user, agent, scopes and inputs for audit.
- Trade-off example: drafting replies runs freely, but sending needs a user click; safer, at the cost of some convenience.
If the interviewer pushes back
- The agent runs unattended overnight with no user present. How do you handle consent and token lifetime?
- The CRM only supports static, all-powerful API keys. What compensating controls do you add?