Duo Security
Connect to Duo Security to manage MFA user lifecycle: create and update users, manage group membership, remove devices, and send enrollment emails.
Connectors
Choose the connector that matches your authentication method. The options below use the names shown in StackAI.
Duo Security
Secret Key
Duo Security
Connect to the Duo Admin API to manage user lifecycle: create and update users, manage group membership, remove MFA devices, and send enrollment emails. Requires an Admin API application with the 'Grant read resource' and 'Grant write resource' permissions, on an Essentials, Advantage, or Premier plan (or an active trial).
Set up in Duo Security
Prepare the Duo Security account or service that the workflow will access. Grant access to the required resources and operations.
Secret Key: The 'Secret key' (skey) of the same Admin API application, shown in full only when the application is created (use 'Reset Secret key' on the application page if you no longer have it).
Set up in StackAI
Open Settings → Connections, add a connection, and select Duo Security.
Enter the credentials and connection details in the fields below.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
Connection fields
Integration Key
Yes
The 'Integration key' (ikey) of a Duo Admin API application. In the Duo Admin Panel open Applications > Add application, search 'Admin API', and click Protect; then on the application's page grant it the 'Read' and 'Write' resource permissions. The Integration key, Secret key, and API hostname are all shown on that page. Requires a Duo edition that includes the Admin API (Essentials, Advantage, or Premier, or an active trial). Provider instructions.
Secret Key
Yes
The 'Secret key' (skey) of the same Admin API application, shown in full only when the application is created (use 'Reset Secret key' on the application page if you no longer have it). Provider instructions.
API Hostname
Yes
The 'API hostname' shown on the Admin API application's page. Paste it as shown (e.g. 'api-XXXXXXXX.duosecurity.com') or just the 'XXXXXXXX' part. Provider instructions.
Verify the connection
Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.
If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.
Use an action
Add the required Duo Security action to the workflow.
Select a connection when the action requests one.
Complete the required fields. Use the reference picker when a value comes from another workflow step.
Run the workflow and inspect the action’s output. Check the result before using it in a later step.
Actions
Create User
Create a new user in your Duo directory so they can enroll in multi-factor authentication.
Inputs
Username
string
Yes
The unique username for the new user (often their directory or email login).
string
No
The user's email address. Required later if you send them an enrollment email.
Full name
string
No
The user's display name.
Status
select (string)
No
The user's account status. Available values: Active, Disabled, Bypass. Default: active.
Notes
string
No
Free-form notes stored on the user.
Outputs
User ID
string
The new user's Duo id.
Username
string
The username.
string
The user's email.
Status
string
The user's status.
Update User
Change a user's status (for example disable or set to bypass) or update their profile details.
Inputs
User
select (string)
Yes
The user to update. Options load from the selected connection.
Status
select (string)
No
The new account status. Available values: Active, Disabled, Bypass, Locked Out.
string
No
Update the user's email.
Full name
string
No
Update the user's display name.
Notes
string
No
Update the notes on the user.
Outputs
User ID
string
The user's Duo id.
Username
string
The username.
Status
string
The user's status after the update.
Add User to Group
Add a user to a Duo group so group-based MFA policy applies to them.
Inputs
User
select (string)
Yes
The user to add to the group. Options load from the selected connection.
Group
select (string)
Yes
The group to add the user to. Options load from the selected connection.
Outputs
User ID
string
The user's Duo id.
Group ID
string
The group's Duo id.
Added
boolean
Whether the user is now in the group.
List User Phones
List the phones (authenticator devices) attached to a user.
Inputs
User
select (string)
Yes
The user whose phones you want to list. Options load from the selected connection.
Page cursor
integer
No
Continue from a previous page. Minimum: 0.
Outputs
Phones
object_array
The phones (authenticator devices) attached to the user.
Next page cursor
integer
Cursor for the next page, if any.
Remove User Phone
Remove a phone from a user, for example when they lose a device.
Inputs
User
select (string)
Yes
The user whose phone you want to remove. Options load from the selected connection.
Phone
select (string)
Yes
The phone to remove from this user. Options load from the selected connection.
Outputs
Removed
boolean
Whether the phone was removed.
User ID
string
The user's Duo id.
Phone ID
string
The removed phone's id.
Send Enrollment Email
Email a user a self-enrollment link so they can set up their own MFA device.
Inputs
Username
select (string)
Yes
The username to enroll. Options load from the selected connection.
string
Yes
The email address to send the enrollment link to.
Link validity (seconds)
integer
No
How long the enrollment link stays valid, in seconds (up to 30 days). Leave blank for the Duo default.
Outputs
Username
string
The username enrolled.
string
The email the link was sent to.
List Users
List the users in your Duo directory, with their id, username, and status.
Inputs
Username
string
No
Return only the user with this exact username. Leave blank for all.
Page cursor
integer
No
Continue from a previous page. Minimum: 0.
Outputs
Users
object_array
The directory users, each with id, username, email, and status.
Next page cursor
integer
Cursor for the next page, if any.
List Groups
List the groups in your Duo account, with their id, name, and description.
Inputs
Page cursor
integer
No
Continue from a previous page. Minimum: 0.
Outputs
Groups
object_array
The groups, each with id, name, and description.
Next page cursor
integer
Cursor for the next page, if any.
Create Group
Create a Duo group that users can be added to for group-based MFA policy.
Inputs
Name
string
Yes
The name of the group to create.
Description
string
No
An optional description for the group.
Outputs
Group ID
string
The new group's Duo id.
Name
string
The group's name.
Description
string
The group's description, if set.
Delete Group
Delete a Duo group. Members are not deleted, only their membership in it.
Inputs
Group
select (string)
Yes
The group to delete. Options load from the selected connection.
Outputs
Group ID
string
The deleted group's Duo id.
Deleted
boolean
Whether the group no longer exists.
Important behavior
Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.
The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.
Last updated
Was this helpful?

