This module interacts with the Duo APIs.
- PowerShell 7 or later
- Duo MFA license or higher
Module Installation (PowerShell Gallery)
Install-Module DuoSecurity
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
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
- Get-DuoAccountEdition
- Get-DuoAccounts
- Get-DuoAccountTelephonyCredits
- New-DuoAccount
- Remove-DuoAccount
- Select-DuoAccount
- Set-DuoAccountEdition
- Set-DuoAccountTelephonyCredits
- Administrative Units
- Administrators
- Clear-DuoAdminInactivity
- Get-DuoAdminActivations
- Get-DuoAdminAuthFactors
- Get-DuoAdminPasswordManagement
- Get-DuoAdmins
- New-DuoAdmin
- New-DuoAdminActivation
- New-DuoAdminActivationLink
- Remove-DuoAdmin
- Remove-DuoAdminActivation
- Remove-DuoAdminActivationLink
- Reset-DuoAdminAuthAttempts
- Send-DuoAdminActivationEmail
- Set-DuoAdminAuthFactors
- Sync-DuoAdminFromDirectory
- Update-DuoAdmin
- Bypass Codes
- Custom Branding
- Endpoints
- Groups
- Info
- Integrations
- Logs
- Phones
- Settings
- Tokens
- Trust Monitor
- Users
- Add-DuoUserPhone
- Add-DuoUserToGroup
- Add-DuoUserToken
- Get-DuoUserBypassCodes
- Get-DuoUserGroups
- Get-DuoUserPhones
- Get-DuoUsers
- Get-DuoUserTokens
- Get-DuoUserWebAuthnCredentials
- New-DuoUser
- New-DuoUserBypassCodes
- Register-DuoUser
- Remove-DuoUser
- Remove-DuoUserFromGroup
- Remove-DuoUserPhone
- Remove-DuoUserToken
- Sync-DuoUserFromDirectory
- Update-DuoUser
- WebAuthn
- Authentication Proxy
- Install & Upgrade