API reference

Self-service password reset

The public API behind the password reset page, where an MSP client's people reset their own Microsoft 365 password.

A person who can't sign in resets their Microsoft 365 (Entra ID) password: they enter their work email, verify with the methods the client workspace's policy names, and choose a new password. Scute sets it through Microsoft Graph, ends their Microsoft sessions (on by default) and sends a notice by email and SMS.

The reset must be turned on for the client workspace, and the workspace must have Microsoft Entra connected. Otherwise every route returns 404 not_available.

The routes need no credential. The flow token returned by the first call identifies the reset for the next calls. A flow lasts 15 minutes.

Every answer has the same shape whether or not the email has an account. Whether the account can be reset (no admin roles, not disabled, not synced from on-premises AD, not excluded by the policy) is only said after the person verified.

Flow object#

Flowjson
{  "token": "prf_x8K2mQ4rT6vX8zA0cE2gI4kM6oQ8sU0wYb3nD5fH7jL9",  "status": "started",  "expires_at": "2026-11-19T14:19:05Z",  "methods": ["entra_push", "sms_otp"],  "required": 1,  "verification": {    "method": "entra_push",    "status": "pending",    "number": 42  }}
FieldDescription
statusstarted, verified, completed, failed or expired.
methodsThe verification methods the person can pick: entra_push, sms_otp, email_otp.
requiredHow many different methods the person must pass (1 or 2).
verificationThe latest method asked for: method, status, number (the number to match in Microsoft Authenticator, for entra_push) and remaining_attempts (for codes).
errorinvalid_code after a wrong code.
reasonWhy the reset failed, when status is failed.

Start a reset#

POST/v1/auth/:app_id/password_resetsNone

:app_id is the client workspace's app.

identifierstringrequired
The person's work email.
cURLbash
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/password_resets \  -H "Content-Type: application/json" \  -d '{"identifier": "ada@acme.com"}'

Returns the flow with status 201.

Statuserror_codeWhen
404not_availableReset is off for the workspace, or Entra is not connected.
422invalid_emailNot an email address.
429too_many_requestsMore than 5 resets for this email in an hour.

Get the flow#

GET/v1/auth/:app_id/password_resets/:tokenNone

Returns the flow. Poll it while a push is out: an approved push moves status to verified once enough methods are passed.

Send a verification#

POST/v1/auth/:app_id/password_resets/:token/verificationsNone
methodstringrequired
One of the flow's methods.
cURLbash
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/password_resets/$FLOW_TOKEN/verifications \  -H "Content-Type: application/json" \  -d '{"method": "sms_otp"}'

Returns the flow. A flow sends up to 5 verifications.

Statuserror_codeWhen
410expiredThe flow has ended. Start again.
422invalid_methodNot one of the flow's methods.
429too_many_requestsFive verifications were already sent.

Submit a code#

POST/v1/auth/:app_id/password_resets/:token/codeNone
codestringrequired
The SMS or email code.

Returns the flow, with error invalid_code after a wrong code. Asking for a code first is required: otherwise 422 no_code_method.

Set the new password#

POST/v1/auth/:app_id/password_resets/:token/completeNone
passwordstringrequired
8 to 256 characters, with at least three of: lowercase, uppercase, numbers, symbols.
cURLbash
curl -X POST https://api.scute.io/v1/auth/$SCUTE_APP_ID/password_resets/$FLOW_TOKEN/complete \  -H "Content-Type: application/json" \  -d '{"password": "'"$NEW_PASSWORD"'"}'

Returns the flow with status completed.

Statuserror_codeWhen
403not_eligibleThe account can't be reset here. details.reason is excluded, privileged, disabled or hybrid.
409not_verifiedThe person has not passed enough verifications.
409verify_againThe verification expired or was used. Verify again.
410expiredThe flow has ended.
422password_weakThe password does not meet the length or character rule.
422password_rejectedMicrosoft did not accept the password (banned list or history).
429too_many_attemptsFive password tries. Start again.
503unavailableThe reset could not reach Microsoft. Try again later.

Errors on every route#

An unknown flow token returns 404 not_found. The POST routes allow 30 requests per minute per IP address. Starting a reset also allows 5 requests per minute per email.