> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate User

Validate a user's risk and send an MFA token via Email or SMS when the risk is above an acceptable threshold.

This action takes care of registering new users as well as validating returning users.

**Required Scope**: `Manage All`.

<Note>
  External Documentation

  To learn more, visit the [OneLogin documentation](https://developers.onelogin.com/api-docs/2/smart-mfa/validate-user).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter                  | Description                                                                                                                                                                       |
  | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Context Device Fingerprint | The unique device fingerprint for the user web browser.                                                                                                                           |
  | Context Device ID          | The mobile device ID or other type of unique identifier for a device.                                                                                                             |
  | Context IP                 | The IP address of the user.<br /><br />Example:`"120.118.218.227"`                                                                                                                |
  | Context Session ID         | The persistent session ID for the for the user.                                                                                                                                   |
  | Context User Agent         | The user agent of the browser.<br /><br />Example:<br />`"user_agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0)"`                                                                |
  | Email                      | The email for sending the MFA token. Required for email-based MFA.                                                                                                                |
  | Phone                      | The phone number for sending the MFA token via SMS. Required for SMS-based MFA.<br /><br />Must be in [E.164 format](https://en.wikipedia.org/wiki/E.164) (e.g., `+15555555555`). |
  | User Identifier            | A unique identifier for the user (unique ID, email address, or username).                                                                                                         |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter      | Description                                                                                                                                                                       |
  | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Expires In     | The window of time in seconds that the token must be verified within.<br /><br />Defaults to `480` seconds (8 minutes). Maximum is `900` seconds (15 minutes).                    |
  | First Name     | The first name of the user.                                                                                                                                                       |
  | Last Name      | The last name of the user.                                                                                                                                                        |
  | Risk Threshold | The risk score level that will trigger an MFA token to be sent.<br /><br />**Note:** If risk is greater than or equal to this value, an MFA token will be sent. Defaults to `50`. |
</div>

## Example Output

```json theme={"dark"}
{
	"user_id": 60254824,
	"risk": {
		"score": 93,
		"reasons": [
			"Chrome on Windows is used infrequently",
			"New location detected",
			"Accessed from a new IP address"
		]
	},
	"mfa": {
		"otp_sent": true,
		"state_token": "67ff7e91-ec38-467d-b7df-c0f4f61efd73"
	}
}
```

## Workflow Library Example

[Validate User with Onelogin and Send Results Via Email](https://library.blinkops.com/workflows/validate-user-with-onelogin-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/validate-user-with-onelogin-and-send-results-via-email/canvas" />
</div>
