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.
| Status | error_code | When |
|---|---|---|
| 401 | Missing or invalid key or token. | |
| 403 | workspace_access_denied | The M2M token's app is not in this workspace. |
| 403 | insufficient_scope | The M2M token lacks the read (GET) or write scope. |
| 404 | workspace_not_found | No workspace with that id or slug. |
Flags#
| Flag | Meaning |
|---|---|
| no_mfa | The account has no MFA method registered. |
| stale | The account has not signed in recently. |
| disabled_with_role | A disabled account still holds a role. |
| guest_admin | A guest account holds a role. |
| dangerous_app_permissions | An application holds a dangerous permission. |
| scute_jit_account | A 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.
/v1/workspaces/:workspace_id/entra/privileged-accessAPI key + M2M tokencurl "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"{ "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.
/v1/workspaces/:workspace_id/entra/privileged-access/scansAPI key + M2M tokencurl 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"{ "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.
/v1/workspaces/:workspace_id/entra/privileged-access/scansAPI key + M2M tokencurl -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"{ "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": {} }}| Status | error_code | When |
|---|---|---|
| 404 | entra_not_connected | The workspace is not connected to Entra. |
| 403 | admin_actions_disabled | Helpdesk admin actions are off for the workspace. |
| 409 | scan_running | A 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.
/v1/workspaces/:workspace_id/entra/privileged-access/findings/:finding_id/fixAPI key + M2M tokencurl -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.
| Status | error_code | When |
|---|---|---|
| 404 | finding_not_found | No such finding in this workspace. |
| 422 | invalid_fix | fix is not one of the three. |
| 422 | fix_not_applicable | The 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.
/v1/workspaces/:workspace_id/entra/privileged-access/rollupAPI key + M2M tokencurl "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"{ "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}