christaylorcodes / DuoSecurity

PowerShell module for Duo Security REST APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

PowerShell module for Duo Security REST APIs

License:MIT License


Languages

Language:PowerShell 100.0%