# IRPCLoginsAdmin.CreatePasswordResetRequest

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Server login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/CreatePasswordResetRequest/

Badges: `Administration API / specialized` `admin` `no session`

Starts the "forgot password" flow for an M-Files login: sends the user an e-mail with a
password reset link.

- **Service:** [Server login accounts](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/index.md) `MFiles.IRPCLoginsAdmin`
- **gRPC method:** `/MFiles.IRPCLoginsAdmin/CreatePasswordResetRequest`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/create-password-reset-request`
- **Request:** [`CreatePasswordResetRequestRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/CreatePasswordResetRequest/index.md#request)
- **Response:** [`CreatePasswordResetRequestResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/CreatePasswordResetRequest/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Not needed: the call can be made before logging in.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Needs no session. The reset URL is not returned to the caller; it is only e-mailed. System
  administrators can get the URL with
  [CreatePasswordResetRequestAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/CreatePasswordResetRequestAdmin/index.md).
- `site_url` must match the M-Files Web address configured for a vault on the server (with
  https if that address uses https); otherwise the call fails with "The parameter is
  incorrect.".
- Fails when password reset is disabled on the server, the login is not found, is a Windows
  login, has no e-mail address, has the system administrator role, or a request was sent for it
  very recently.
- On servers with vault login accounts, the vault given by `vault_guid` (or found from the host
  of `site_url`) is tried first.
- The link is valid for 7 days by default. Complete the reset with
  [ResetPassword](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/ResetPassword/index.md).

<a id="request"></a>

## Request: CreatePasswordResetRequestRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `account_name` | `string` | The login's account name. Leave empty to identify the login by `account_email_address`. |
| `account_email_address` | `string` | Used only when `account_name` is empty; exactly one login must have this address. |
| `site_url` | `string` | The M-Files Web page that handles the reset. The link is this URL with `username`, `hash` and `expiration` query parameters added. |
| `send_email` | `bool` | True if an e-mail containing the password reset URL should be sent to the user. |
| `vault_guid` | `string` | Optional vault for servers that use vault login accounts. |

<a id="response"></a>

## Response: CreatePasswordResetRequestResponse

No fields.

<a id="related"></a>

## Related methods

- [CreatePasswordResetRequestAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/CreatePasswordResetRequestAdmin/index.md): Creates a password reset link for an M-Files login, returns it, and optionally e-mails it to the user.
- [ResetPassword](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLoginsAdmin/ResetPassword/index.md): Completes the "forgot password" flow: sets a new password for a login with the values from the password reset link.
