Case 49C295 · AI security · L4 Advanced

Identity and Access for AI Agents

Practise as: InterviewLevel: L4 Advanced

Interview questionAn AI agent will act for users across email, calendar and the CRM. How would you design its identity and access?

  1. 01 Answer
  2. 02 Example
  3. 03 Trade-offs
What a strong answer covers

Try it out loud first. Then check yourself:

  1. Give the agent its own identity, never a shared human or admin account, so every action is attributable and revocable.
  2. Use delegated access: OAuth on behalf of the user with scoped, short-lived tokens, so it can never exceed the user's rights.
  3. Least privilege per task: split read from write scopes, and require human approval for sends, deletes and payments.
  4. Keep tokens server-side, never in the prompt; log every tool call with user, agent, scopes and inputs for audit.
  5. 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?

More AI security cards

All AI security cards →

cardosec draws a security topic and gives you a clock: explain it out loud with no notes, then see what you covered and what you missed. Free during early access.

Reviewed 2026-10-09