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#
{ "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 }}| Field | Description |
|---|---|
| status | started, verified, completed, failed or expired. |
| methods | The verification methods the person can pick: entra_push, sms_otp, email_otp. |
| required | How many different methods the person must pass (1 or 2). |
| verification | The latest method asked for: method, status, number (the number to match in Microsoft Authenticator, for entra_push) and remaining_attempts (for codes). |
| error | invalid_code after a wrong code. |
| reason | Why the reset failed, when status is failed. |
Start a reset#
/v1/auth/:app_id/password_resetsNone:app_id is the client workspace's app.
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.
| Status | error_code | When |
|---|---|---|
| 404 | not_available | Reset is off for the workspace, or Entra is not connected. |
| 422 | invalid_email | Not an email address. |
| 429 | too_many_requests | More than 5 resets for this email in an hour. |
Get the flow#
/v1/auth/:app_id/password_resets/:tokenNoneReturns the flow. Poll it while a push is out: an approved push moves status to verified once enough methods are passed.
Send a verification#
/v1/auth/:app_id/password_resets/:token/verificationsNonecurl -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.
| Status | error_code | When |
|---|---|---|
| 410 | expired | The flow has ended. Start again. |
| 422 | invalid_method | Not one of the flow's methods. |
| 429 | too_many_requests | Five verifications were already sent. |
Submit a code#
/v1/auth/:app_id/password_resets/:token/codeNoneReturns 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#
/v1/auth/:app_id/password_resets/:token/completeNonecurl -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.
| Status | error_code | When |
|---|---|---|
| 403 | not_eligible | The account can't be reset here. details.reason is excluded, privileged, disabled or hybrid. |
| 409 | not_verified | The person has not passed enough verifications. |
| 409 | verify_again | The verification expired or was used. Verify again. |
| 410 | expired | The flow has ended. |
| 422 | password_weak | The password does not meet the length or character rule. |
| 422 | password_rejected | Microsoft did not accept the password (banned list or history). |
| 429 | too_many_attempts | Five password tries. Start again. |
| 503 | unavailable | The 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.