A permission marked requester_only in the app's policy can be used by an agent only on the task's requester. On anyone else, the agent needs a reviewer's approval for that exact call. This stops a prompt such as "also reset the CEO's MFA" from going through on its own.
Set the flag on the permission in the app's authorization policy, through the policy API (see the API reference) or the dashboard.
Who the requester is#
- The requester your backend passed when it created the task: app_user_id, email or phone.
- Without a requester, the person the task acts for.
A target matches the requester by app user id, external id, email (case-insensitive) or phone (the digits, when there are 7 or more).
Naming the target#
The call says who it is for in context.target (an app user id, external id, email or phone), or as the object's key, such as account:APP_USER_ID.
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/agent/check \ -H "Authorization: Bearer $TASK_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "action": "reset_mfa", "context": { "target": "sam@example.com" } }'What the check answers#
| Situation | Decision | reason | say |
|---|---|---|---|
| No target given | deny | target_required | "Who is this for?" |
| Target is the requester | The person's own decision | ||
| Target is someone else | allow_with_approval | target_not_requester | "I can only do that for you. For someone else, a person on the team has to approve it first." |
| Someone else, with a usable approval for this exact call | allow | ||
| The task acts for nobody | deny | needs_human |
For someone else, request an approval with the same action, object and details, and pass its id as approval. When the permission also requires verification, the person verifies first; the approval waits until then. If the permission's own approval already covered the call, no second approval is needed.