API reference

Helpdesk account actions

Lock and re-enable accounts, reset passwords, revoke sessions, manage MFA methods, licenses and groups in a client's Microsoft Entra tenant.

These endpoints change people in the Microsoft Entra tenant connected to a workspace, through Scute's app in that tenant. Every write that can harm the account needs a fresh verification of the person it acts on.

Authentication#

API key + M2M token, as on Helpdesk. The workspace in the URL is the tenant's workspace (usually a client workspace), and the M2M token must belong to an app in it.

A call made with an API key has no team role, so operator roles do not limit it. It is logged with the key as the actor (its nickname, else API key <id>).

Verify-then-act#

A gated action runs only with challenge_id: the id of a challenge that

  • is completed, on its method's own path,
  • was completed less than 10 minutes ago,
  • has not authorized another action (a challenge authorizes one action),
  • belongs to the person the action targets: the challenge's user has the Entra object ID or UPN you send as user_oid or upn,
  • was created in this workspace, a workspace above it or a workspace below it.

Accepted proofs: email_otp, sms_otp, totp, backup_code (by code), webauthn (by passkey), entra_push, duo. A magic_link counts only when the workspace allows links for helpdesk actions in its team settings. A push or passkey approved on an approve route never counts.

Create the challenge with Create a workspace challenge or Create a challenge, then pass its id.

An owner or admin signed in to the dashboard can skip the verification with override and override_reason, or skip a safety guard with force and force_reason. An API key cannot: 403 escalation_requires_user.

Shared parameters#

workspace_idstringrequired
Path. The tenant's workspace, UUID or slug.
user_oidstringrequired
Path. The person's Entra object ID or UPN.
challenge_idstring
The verification that authorizes a gated action.
upnstring
The person's UPN, matched against the challenge and recorded in the audit row.
approval_idstring
An approved request, when an approval rule covers the action. It must cover exactly this action and target.
psa_ticketobject
A PSA ticket that gets an internal note about the action: ticket_id with connection_id or provider.

Responses#

A successful action returns 200 with ok: true, and data when the action returns something (a list, a temporary password):

Response 200json
{ "ok": true, "data": { "temporary_password": "q7#Vt9!mRw2&Lp4z" } }

A refused or failed action returns ok: false:

Response 422json
{ "ok": false, "error": "verification_expired", "detail": "verification older than 10 minutes" }
StatuserrorWhen
404Entra not connected for this workspaceNo Entra connection.
403Admin actions are not enabled for this workspaceHelpdesk actions are off for the tenant.
403escalation_requires_useroverride or force sent with an API key.
403approval_requiredAn approval rule covers the action. The body's approval names the rule.
403missing_permissionScute's app lacks a Microsoft Graph permission. scope names it.
404not_foundMicrosoft does not know the object.
422verification_required, verification_invalid, verification_expired, verification_consumed, verification_wrong_user, verification_wrong_action, verification_wrong_workspace, verification_method_not_acceptedThe challenge does not authorize this action. detail says why.
422self_lock_refused, global_admin_lock_refused, global_admin_reset_refused, global_admin_offboard_refused, global_admin_delete_refused, sole_method_reset_refused, role_assignable_group_refused, unsupported_method_typeA safety guard refused the action.
422psa_ticket_invalid, psa_ticket_ambiguousThe PSA ticket reference does not resolve.
423operator_pausedA tripwire paused this actor. An owner or admin has to lift it.
429rate_limitedMicrosoft throttled the call.
502Microsoft returned another error. detail carries its message.

When a verification or guard error stops an action, the challenge is not spent.

People#

Get a person#

The person as Microsoft has them. Not gated.

GET/v1/workspaces/:workspace_id/entra/users/:user_oidAPI key + M2M token
Requestbash
curl https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "ok": true,  "data": {    "oid": "9b1f2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",    "upn": "jane@wayne.example",    "name": "Jane Doe",    "email": "jane@wayne.example",    "enabled": true,    "hybrid": false,    "job_title": "Accountant",    "user_type": "Member",    "created_at": "2024-03-02T10:00:00Z",    "last_sign_in_known": true,    "last_sign_in_at": "2026-11-19T08:14:00Z",    "admin_roles": []  }}

last_sign_in_known is false when the tenant lacks the permission or license to read sign-in activity. admin_roles is null when the roles could not be read.

Search people#

People whose name, UPN or email starts with q. Not gated.

GET/v1/workspaces/:workspace_id/entra/usersAPI key + M2M token
qstringrequired
Query. At least 2 characters.
limitinteger
Query. Default 10, at most 25.
Requestbash
curl "https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users?q=jane" \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "ok": true,  "data": {    "users": [      { "oid": "9b1f2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d", "upn": "jane@wayne.example", "name": "Jane Doe", "email": "jane@wayne.example", "enabled": true, "user_type": "Member" }    ]  }}

422 when q is shorter than 2 characters.

Recent sign-ins#

The person's last 10 sign-ins. Not gated. Needs the tenant's AuditLog.Read.All permission.

GET/v1/workspaces/:workspace_id/entra/users/:user_oid/sign-insAPI key + M2M token
Requestbash
curl https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/sign-ins \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "ok": true,  "data": {    "sign_ins": [      { "at": "2026-11-19T08:14:00Z", "app": "Office 365", "ip": "203.0.113.7", "client": "Browser", "location": "Austin, US", "success": true }    ]  }}

A failed sign-in also has failure_reason. Send upn as a query parameter when user_oid is an object ID.

Create a person#

Creates an enabled account with a temporary password that must be changed at first sign-in. Not gated: there is no one to verify yet.

POST/v1/workspaces/:workspace_id/entra/usersAPI key + M2M token
display_namestringrequired
Display name.
upnstringrequired
Sign-in name.
mail_nicknamestring
Default: the part of upn before @.
usage_locationstring
Two-letter country code, needed before licenses can be assigned.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "display_name": "Sam Lee", "upn": "sam@wayne.example", "usage_location": "US" }'
Response 200json
{  "ok": true,  "data": {    "user": { "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "userPrincipalName": "sam@wayne.example", "displayName": "Sam Lee" },    "temporary_password": "q7#Vt9!mRw2&Lp4z"  }}

The temporary password is returned once and stored nowhere. 422 when display_name or upn is missing.

Invite a guest#

Invites an external guest; Microsoft sends the invitation email. Not gated.

POST/v1/workspaces/:workspace_id/entra/invitationsAPI key + M2M token
emailstringrequired
The guest's email.
display_namestring
The guest's name.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/invitations \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "email": "auditor@partner.example" }'
Response 200json
{ "ok": true, "data": { "invited_user_id": "7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f", "redeem_url": "https://login.microsoftonline.com/redeem?..." } }

Account#

Lock an account#

Disables the account. Gated. Refuses to lock a Global Administrator, or the actor's own account.

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/lockAPI key + M2M token
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/lock \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "challenge_id": "48da3b64-413f-48f3-bd22-40443fc0019d" }'
Response 200json
{ "ok": true }

Re-enable an account#

Enables the account again. Gated. A disabled person usually cannot complete a challenge, so re-enabling normally goes through a signed-in admin's override.

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/unlockAPI key + M2M token

Reset a password#

Gated. Refused for a Global Administrator.

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/reset-passwordAPI key + M2M token
modestring
force_change (default): the person must choose a new password at next sign-in; the current one works until then. reset: sets a generated temporary password and returns it.
challenge_idstringrequired
The verification.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/reset-password \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "mode": "reset", "challenge_id": "48da3b64-413f-48f3-bd22-40443fc0019d" }'
Response 200json
{ "ok": true, "data": { "temporary_password": "q7#Vt9!mRw2&Lp4z" } }

The temporary password is returned once and stored nowhere. Another mode returns 422.

Revoke sessions#

Ends every session and refresh token the person holds. Gated.

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/revoke-sessionsAPI key + M2M token
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/revoke-sessions \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "challenge_id": "48da3b64-413f-48f3-bd22-40443fc0019d" }'

Create a Temporary Access Pass#

A time-limited passcode that signs the person in without password or MFA. Gated. The pass is returned once.

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/tapAPI key + M2M token
lifetime_minutesinteger
Default 60, between 10 and 480.
challenge_idstringrequired
The verification.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/tap \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "lifetime_minutes": 30, "challenge_id": "48da3b64-413f-48f3-bd22-40443fc0019d" }'
Response 200json
{ "ok": true, "data": { "temporary_access_pass": "Xk7#pQ2m", "lifetime_minutes": 30 } }

Offboard a person#

Under one verification, in this order: disable the account, revoke sessions, set an out of office reply (optional), remove from groups (optional), remove licenses. Each step is reported on its own (disable, revoke_sessions, out_of_office, remove_groups, remove_licenses) and the sweep continues past a failed step. complete is true when every step succeeded. The account is not deleted. Refused for a Global Administrator.

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/offboardAPI key + M2M token
challenge_idstringrequired
The verification.
remove_groupsboolean
Also remove the person from their groups.
out_of_office_messagestring
Sets this out of office reply. At most 1,000 characters. Needs the tenant's MailboxSettings.ReadWrite permission.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/offboard \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "challenge_id": "48da3b64-413f-48f3-bd22-40443fc0019d", "remove_groups": true }'
Response 200json
{  "ok": true,  "data": {    "steps": [      { "step": "disable", "ok": true, "at": "2026-11-19T14:05:00Z" },      { "step": "revoke_sessions", "ok": true, "at": "2026-11-19T14:05:01Z" },      { "step": "remove_groups", "ok": true, "removed": 3, "at": "2026-11-19T14:05:02Z" },      { "step": "remove_licenses", "ok": true, "removed": 1, "at": "2026-11-19T14:05:03Z" }    ],    "complete": true  }}

Delete a person#

Deletes the account. Gated. Refused for a Global Administrator.

DELETE/v1/workspaces/:workspace_id/entra/users/:user_oidAPI key + M2M token
Requestbash
curl -X DELETE https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "challenge_id": "48da3b64-413f-48f3-bd22-40443fc0019d" }'

MFA methods#

List MFA methods#

The person's registered authentication methods. Not gated.

GET/v1/workspaces/:workspace_id/entra/users/:user_oid/mfa-methodsAPI key + M2M token
Requestbash
curl https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/mfa-methods \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "ok": true,  "data": {    "methods": [      { "id": "3179e48a-750b-4051-897c-87b9720928f7", "type": "#microsoft.graph.phoneAuthenticationMethod", "display": "+1 4155551234", "removable": true, "created_at": "2025-01-10T09:00:00Z" }    ]  }}

removable is true for the method types Scute can delete: Microsoft Authenticator, phone, FIDO2, software OATH, email, Windows Hello for Business and Temporary Access Pass.

Delete an MFA method#

Deletes one method, for example a lost phone. Gated.

DELETE/v1/workspaces/:workspace_id/entra/users/:user_oid/mfa-methods/:method_idAPI key + M2M token
method_idstringrequired
Path. The method's id.
method_typestringrequired
The method's type from the list, for example #microsoft.graph.phoneAuthenticationMethod.
challenge_idstringrequired
The verification.

422 unsupported_method_type for a type Scute cannot delete.

Reset MFA#

Deletes every removable method so the person enrolls again. Gated. When the person has one removable method or none, a challenge is not accepted (it would have been answered by that same method) and the call returns 422 sole_method_reset_refused.

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/mfa-resetAPI key + M2M token
Response 200json
{  "ok": true,  "data": {    "deleted": [      { "id": "3179e48a-750b-4051-897c-87b9720928f7", "type": "#microsoft.graph.phoneAuthenticationMethod", "ok": true }    ],    "complete": true  }}

Licenses#

List the tenant's licenses#

The tenant's subscribed SKUs with seat counts. Not gated.

GET/v1/workspaces/:workspace_id/entra/licensesAPI key + M2M token
Response 200json
{  "ok": true,  "data": {    "skus": [      { "sku_id": "c42b9cae-ea4f-4ab7-9717-81576235ccac", "sku_part_number": "DEVELOPERPACK_E5", "enabled": 25, "consumed": 20, "available": 5 }    ]  }}

List a person's licenses#

GET/v1/workspaces/:workspace_id/entra/users/:user_oid/licensesAPI key + M2M token
Response 200json
{ "ok": true, "data": { "sku_ids": ["c42b9cae-ea4f-4ab7-9717-81576235ccac"] } }

Change a person's licenses#

Adds and removes licenses. Removing is gated; a call that only adds is not.

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/licensesAPI key + M2M token
addstring[]
SKU IDs to assign.
removestring[]
SKU IDs to remove.
challenge_idstring
The verification. Required when remove is not empty.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/licenses \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "add": ["c42b9cae-ea4f-4ab7-9717-81576235ccac"] }'

Microsoft's own refusals, such as no free seats, come back with its message in detail.

Groups#

List a person's groups#

GET/v1/workspaces/:workspace_id/entra/users/:user_oid/groupsAPI key + M2M token
Response 200json
{  "ok": true,  "data": {    "groups": [      { "id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b", "display_name": "Finance", "role_assignable": false, "dynamic": false }    ]  }}

role_assignable groups carry directory roles. dynamic groups are managed by a rule and take no manual members.

Search groups#

Groups whose name starts with q. Not gated.

GET/v1/workspaces/:workspace_id/entra/groupsAPI key + M2M token
qstringrequired
Query. At least 2 characters.
limitinteger
Query. Default 10, at most 25.

Each group has id, display_name, description, role_assignable, dynamic, security and mail_enabled.

Add to a group#

Not gated. Refused for a role-assignable group (422 role_assignable_group_refused).

POST/v1/workspaces/:workspace_id/entra/users/:user_oid/groupsAPI key + M2M token
group_idstringrequired
The group's ID.
Requestbash
curl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/users/jane@wayne.example/groups \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \  -H "Content-Type: application/json" \  -d '{ "group_id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b" }'

Remove from a group#

Gated. Refused for a role-assignable group.

DELETE/v1/workspaces/:workspace_id/entra/users/:user_oid/groups/:group_idAPI key + M2M token

Remove a directory role#

Removes one directory role assignment. Gated. Refuses to remove the actor's own role or the tenant's last Global Administrator assignment (last_global_admin_refused). A group or an app holding the role cannot verify, so only a signed-in admin's override removes theirs.

DELETE/v1/workspaces/:workspace_id/entra/users/:user_oid/roles/:role_assignment_idAPI key + M2M token
role_assignment_idstringrequired
Path. The assignment's ID.
principal_typestring
user (default), or the kind of holder when user_oid is a group or app.
challenge_idstringrequired
The verification.

Audit log#

Get a tenant's audit log#

What the helpdesk has done in this tenant, newest first: every action above, vault checkouts and JIT accounts, and the findings of privileged access scans. On /entra/users/:user_oid/audit-log it is narrowed to one person. An MSP or Master reads all its clients at once with Get the activity feed.

GET/v1/workspaces/:workspace_id/entra/audit-logAPI key + M2M token

Same filters, paging, CSV export and row shape as the activity feed, without client.

Requestbash
curl "https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/audit-log?actions=password_reset&limit=10" \  -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \  -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"
Response 200json
{  "ok": true,  "data": {    "entries": [      {        "id": "0193fb10-2222-7333-8444-555555555555",        "at": "2026-11-19T13:58:02Z",        "action": "password_reset",        "actor": "helpdesk-server",        "actor_type": "api_key",        "target": "jane@wayne.example",        "ok": true,        "provider": "entra",        "verification": "challenge",        "verification_id": "48da3b64-413f-48f3-bd22-40443fc0019d",        "forced": false,        "psa_ticket": null,        "meta": {}      }    ]  }}
GET/v1/workspaces/:workspace_id/entra/users/:user_oid/audit-logAPI key + M2M token