API reference

Privileged access

Scan a client's Microsoft tenant for accounts with admin power, read the findings and fix them.

A privileged access scan lists every principal in a client's Microsoft tenant that holds a directory role (directly or through a group) or a dangerous application permission, and flags what is risky about each. Scans run per client workspace. A Master or MSP reads the latest scan of every client under it with the rollup.

The workspace must be connected to Entra with helpdesk admin actions on. The scan needs RoleManagement.Read.Directory; the other read permissions add parts of the scan, and a part that cannot be read is listed in gaps. Get admin capabilities shows which are granted.

All calls take an app key or workspace key in Authorization and an M2M token in X-Authorization. The M2M token's app has to be in the workspace in the path. See Authentication.

Statuserror_codeWhen
401Missing or invalid key or token.
403workspace_access_deniedThe M2M token's app is not in this workspace.
403insufficient_scopeThe M2M token lacks the read (GET) or write scope.
404workspace_not_foundNo workspace with that id or slug.

Flags#

FlagMeaning
no_mfaThe account has no MFA method registered.
staleThe account has not signed in recently.
disabled_with_roleA disabled account still holds a role.
guest_adminA guest account holds a role.
dangerous_app_permissionsAn application holds a dangerous permission.
scute_jit_accountA JIT (time-limited) admin account made by Scute.

unknown_flags lists the flags that could not be checked for a principal. A scan's tenant_flags can hold too_many_global_admins.

Get the latest scan#

Returns the latest completed scan with its findings, and the scan in progress, if any.

GET/v1/workspaces/:workspace_id/entra/privileged-accessAPI key + M2M token
workspace_idstringrequired
The client workspace UUID or slug.
flagstring
Query. Only findings with this flag.
flaggedboolean
Query. Only findings with any flag.
Requestbash
curl "https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/privileged-access?flagged=true" \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "connected": true,  "scan": {    "id": "0193fc00-1111-7222-8333-444444444444",    "provider": "entra",    "status": "completed",    "trigger": "manual",    "requested_by": "Helpdesk integration",    "started_at": "2026-11-19T08:00:00.000Z",    "completed_at": "2026-11-19T08:00:41.000Z",    "summary": {      "principals": 14,      "users": 9,      "groups": 2,      "service_principals": 3,      "global_admins": 4,      "flagged": 3,      "flag_counts": { "no_mfa": 1, "stale": 2 }    },    "tenant_flags": [],    "gaps": {}  },  "running": null,  "findings": [    {      "id": "0193fc01-1111-7222-8333-444444444444",      "scan_id": "0193fc00-1111-7222-8333-444444444444",      "principal_id": "9a448e26-e2cc-4598-bade-0a5581de9af6",      "principal_type": "user",      "display_name": "Old Admin",      "upn": "old.admin@contoso.com",      "roles": [{ "assignment_id": "...", "display_name": "Global Administrator" }],      "app_permissions": [],      "flags": ["stale", "no_mfa"],      "unknown_flags": [],      "details": { "account_enabled": true, "user_type": "Member" },      "fixes": []    }  ]}

principal_type is user, group, service_principal or unknown. A role held through a group carries via_group. fixes records each fix run from the finding (fix, ok, error, actor, at).

List scans#

Newest first. Scans are kept for 90 days.

GET/v1/workspaces/:workspace_id/entra/privileged-access/scansAPI key + M2M token
workspace_idstringrequired
The client workspace UUID or slug.
limitinteger
Query. Default 20, at most 100.
Requestbash
curl https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/privileged-access/scans \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "scans": [    { "id": "0193fc00-1111-7222-8333-444444444444", "provider": "entra", "status": "completed", "trigger": "manual", "started_at": "2026-11-19T08:00:00.000Z", "completed_at": "2026-11-19T08:00:41.000Z", "summary": {}, "tenant_flags": [], "gaps": {} }  ]}

status is running, completed or failed (with error). trigger is manual or scheduled. A scan still running after an hour is marked failed.

Start a scan#

Queues a scan. A scan only reads the tenant. One runs at a time per workspace.

POST/v1/workspaces/:workspace_id/entra/privileged-access/scansAPI key + M2M token
workspace_idstringrequired
The client workspace UUID or slug.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/privileged-access/scans \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 202json
{  "scan": { "id": "0193fc02-1111-7222-8333-444444444444", "provider": "entra", "status": "running", "trigger": "manual", "requested_by": "Helpdesk integration", "started_at": "2026-11-19T10:00:00.000Z", "summary": {}, "tenant_flags": [], "gaps": {} }}
Statuserror_codeWhen
404entra_not_connectedThe workspace is not connected to Entra.
403admin_actions_disabledHelpdesk admin actions are off for the workspace.
409scan_runningA scan is already running. details.scan is that scan.

Fix a finding#

Runs a fix on the principal a finding names. The fix goes through the helpdesk actions, so operator authorization, tripwires, approval rules and verify-then-act apply as for any helpdesk action. What it acts on comes from the finding, never from the request.

POST/v1/workspaces/:workspace_id/entra/privileged-access/findings/:finding_id/fixAPI key + M2M token
workspace_idstringrequired
The client workspace UUID or slug.
finding_idstringrequired
The finding id.
fixstringrequired
remove_role (runs remove_role), disable (runs lock) or tap (issues a Temporary Access Pass). disable and tap apply to users only.
role_assignment_idstring
With remove_role: one of the principal's own role assignments. A role held through a group is removed from the group instead.
lifetime_minutesinteger
With tap: how long the pass lives.
challenge_idstring
A completed verification that authorizes the action (verify-then-act).
approval_idstring
An approved request that covers the action, when an approval rule applies.
overrideboolean
Act without a verification. Needs override_reason. Refused for an API key with 403 escalation_requires_user.
override_reasonstring
Why the verification is skipped.
forceboolean
Bypass a safety guard. Needs force_reason. Refused for an API key like override.
force_reasonstring
Why the guard is bypassed.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/privileged-access/findings/$FINDING_ID/fix \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "fix": "disable", "challenge_id": "0193f901-7c1d-7b3b-9a10-2f6f1c0d3b7c" }'

The status and body are the helpdesk action's answer. The outcome is also recorded in the finding's fixes. A Temporary Access Pass is returned once and never stored.

Statuserror_codeWhen
404finding_not_foundNo such finding in this workspace.
422invalid_fixfix is not one of the three.
422fix_not_applicableThe fix does not apply to this principal, or role_assignment_id is not one of its own assignments.

A refused helpdesk action answers { "ok": false, "error": "..." } with its own code in error, for example verification_required.

Get the rollup#

The latest completed scan of every workspace under this one (an MSP's clients, or a Master's whole tree), with totals, scans in progress, connected clients with no scan yet, and the findings across clients, paged.

GET/v1/workspaces/:workspace_id/entra/privileged-access/rollupAPI key + M2M token
workspace_idstringrequired
Master or MSP workspace UUID or slug.
flagstring
Query. Only findings with this flag.
flaggedboolean
Query. Only findings with any flag.
pageinteger
Query. Default 1.
limitinteger
Query. Findings per page. Default 100, at most 500.
Requestbash
curl "https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/privileged-access/rollup?flagged=true" \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "workspace_id": "0193f8aa-1111-7222-8333-444444444444",  "totals": {    "principals": 140, "users": 90, "groups": 20, "service_principals": 30, "global_admins": 31, "flagged": 22,    "clients": 10, "flag_counts": { "no_mfa": 6, "stale": 16 }, "tenant_flags": { "too_many_global_admins": 2 }  },  "clients": [    { "workspace": { "id": "0193f8aa-5555-7666-8777-888888888888", "name": "Contoso", "slug": "contoso", "workspace_type": "msp_client" }, "scan": { "id": "0193fc00-1111-7222-8333-444444444444", "status": "completed" } }  ],  "running": [],  "unscanned": [    { "id": "0193f8aa-6666-7777-8888-999999999999", "name": "Fabrikam", "slug": "fabrikam", "workspace_type": "msp_client" }  ],  "findings": [    { "id": "0193fc01-1111-7222-8333-444444444444", "principal_type": "user", "upn": "old.admin@contoso.com", "flags": ["stale"], "workspace": { "id": "0193f8aa-5555-7666-8777-888888888888", "name": "Contoso", "slug": "contoso", "workspace_type": "msp_client" } }  ],  "total_pages": 1,  "current_page": 1,  "per_page": 100}