Skip to main content
This endpoint allows an authorized administrator to change the password for any user account in the tenant (students, instructors, or parents). The target user can be resolved flexibly using any of the four supported identity attributes (email, mobile, code, or national_id), or via a single unified identifier field. Upon a successful password change, the user’s password hash is updated, all temporary OTP and PIN codes are cleared, and active OAuth access tokens are revoked for security.

Endpoint

Required role: admin (or an authenticated user with edit users permission).

Required Headers

Flexible User Lookup: You can identify the target user either by providing explicit fields (email, mobile, code, national_id) OR by passing a single identifier parameter that automatically matches across all four fields. At least one identifier must be provided.

Request Body

string
required
The new password for the user account (minimum 6 characters).
string
Optional confirmation that must match password when provided.
string
Unified search string. Matches against email, mobile, code, or national_id.
string
The user’s email address.
string
The user’s mobile / phone number.
string
The user’s student or system code (e.g., STU-1024).
string
The user’s national identity number (e.g., 14-digit Egyptian national ID).

Example Requests

1. Using the Unified Identifier

2. Using National ID

3. Using Student Code

Response

200 OK

Returns success confirmation and the resolved user summary details.
Response fields:

Validation Error Response (422)

Returned when required parameters are missing or invalid (e.g. no identifier passed or password is too short).

Not Found Response (404)

Returned when no user in the current tenant matches any of the provided identifiers.

Error Responses

Session Security: When an administrator changes a user’s password, all active Passport access tokens (oauth_access_tokens) for that user are immediately revoked, preventing compromised devices or unauthorized active sessions from remaining logged in.