> ## 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.

# Run Second Factor Authentication

Perform second-factor authentication for a user.

<Note>
  External Documentation

  To learn more, visit the [Duo Auth documentation](https://duo.com/docs/authapi#/auth).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                |
  | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | Async             | Determine whether to execute the action asynchronously. <br /><br />If set to `1`, the action will return a `transaction ID`, which later can be used with the `Get Auth Status` action.<br /><br />If this parameter is not provided, or set to **0**, the action will only return a response once authentication is complete.                                                                                                            |
  | Device            | ID of the device to authentication by. This device must have the capability of the corresponding factor.<br /><br />To obtain the device ID and verify it's capabilities, you can use the `Run Preauth` action and check the specific device's information.                                                                                                                                                                                |
  | Display Username  | String to display in Duo Mobile in place of the user's Duo username.                                                                                                                                                                                                                                                                                                                                                                       |
  | Factor            | Factor to use for authentication. For more information on each factor, please visit [Duo's documentation](https://duo.com/docs/authapi#/auth). <br /><br />`Note:` To use the different factors you must enable them in the applied policy. Check our [Duo Auth documentation](https://docs.blinkops.com/docs/integrations/duo-auth) for further information.                                                                              |
  | Passcode          | Passcode entered by the user.                                                                                                                                                                                                                                                                                                                                                                                                              |
  | Push Info         | A set of URL-encoded key/value pairs with additional contextual information associated with this authentication attempt. The Duo Mobile app will display this information to the user. <br /><br />**Note**, The URL-encoded string's total length must be less than 20,000 bytes.                                                                                                                                                         |
  | Push Notification | The string that displays in the Duo Mobile app push notification and UI.                                                                                                                                                                                                                                                                                                                                                                   |
  | Transaction ID    | The transaction ID received in the `Run Preauth` action response when the request specified `Client Supports Verified Push`= 1 for `Verified Duo Push`.                                                                                                                                                                                                                                                                                    |
  | User ID           | The unique identifier for the user as generated by `Duo` upon user creation. <br /><br />Can be obtained by the `List Users` action in the Duo collection.<br />`Important To Note:` The `Duo` collection has a separate connection that requires Admin API Credentials. Please follow [our Duo documentation](https://docs.blinkops.com/docs/integrations/duo) to obtain them.                                                            |
  | User Info Type    | Choose the user's information to provide. You must specify either the user ID or the username.                                                                                                                                                                                                                                                                                                                                             |
  | Username          | The Unique username that is commonly specified during user creation. This value may also represent a username alias assigned to a user. <br /><br />Can be obtained by the `List Users` action in the Duo collection.<br />`Important To Note:` The `Duo` collection has a separate connection that requires Admin API Credentials. Please follow [our Duo documentation](https://docs.blinkops.com/docs/integrations/duo) to obtain them. |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter  | Description                                                                                                                                                                                                                                         |
  | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Hostname   | The host name of the device accessing the application.                                                                                                                                                                                              |
  | IP Address | The IP address of the user to be authenticated. <br /><br />If an Auth API client does not send the ipaddr value in a request, policy settings based on available IP address information, like authorized networks or user location have no effect. |
</div>

## Example Output

```json theme={"dark"}
{
	"stat": "OK",
	"response": {
		"result": "allow",
		"status": "allow",
		"status_msg": "Success. Logging you in..."
	}
}
```

## Workflow Library Example

[Run Second Factor Authentication with Duo Auth and Send Results Via Email](https://library.blinkops.com/workflows/run-second-factor-authentication-with-duo-auth-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/run-second-factor-authentication-with-duo-auth-and-send-results-via-email/canvas" />
</div>
