Skip to content

JohnDuprey/DuoSecurity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DuoSecurity Module

DuoSecurityDownloads DuoSecurityBuild DuoSecurityPublish

This module interacts with the Duo APIs.

Instructions

Prerequisites

  • PowerShell 7 or later
  • Duo MFA license or higher

Module Installation (PowerShell Gallery)

Install-Module DuoSecurity

Supported Duo APIs

Examples

Accounts API

Import-Module DuoSecurity

# Accounts API Credentials (MSP only)
$Auth = @{
    Type           = 'Accounts'
    IntegrationKey = 'DUO_INTEGRATION_KEY'
    SecretKey      = 'DUO_SECRET_KEY'
    ApiHost        = 'api-xxxxxxxx.duosecurity.com'
}
Set-DuoApiAuth @Auth

# Retrieve list of Duo child accounts
Get-DuoAccounts

# Select account to use for Admin API queries
Select-DuoAccount -Name 'Your child account name'

# Retrieve user list
Get-DuoUsers

Admin API

Import-Module DuoSecurity

# Admin API credentials
$Auth = @{
    Type           = 'Admin'
    IntegrationKey = 'DUO_INTEGRATION_KEY'
    SecretKey      = 'DUO_SECRET_KEY'
    ApiHost        = 'api-xxxxxxxx.duosecurity.com'
}
Set-DuoApiAuth @Auth

# Retrieve user list
Get-DuoUsers

Cmdlet Help

Accounts API

Admin API

Apps

Auth API

Authentication

Misc