Created
February 6, 2021 18:08
-
-
Save neil-sabol/de22ecac1805179db720c0b211f08bdd to your computer and use it in GitHub Desktop.
See https://blog.neilsabol.site/post/importing-duo-psmodule-mfa-powershell-module-azure-automation. This snippet demonstrates securely providing Duo integration details to the Duo-PSModule in Azure Automation using encrypted Automation Variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Duo integration details from Automation Variables | |
$duoiKey = Get-AutomationVariable -Name MyDuoiKey | |
$duosKey = Get-AutomationVariable -Name MyDuosKey | |
$duoApiHost = Get-AutomationVariable -Name MyDuoHostname | |
$duoDirID = Get-AutomationVariable -Name MyDuoDirectoryID | |
# Build the $DuoOrgs hashtable from retrieved Automation Variables | |
[string]$DuoDefaultOrg = "Personal" | |
[Hashtable]$DuoOrgs = @{ | |
Personal = [Hashtable]@{ | |
iKey = [string]$duoiKey | |
sKey = [string]$duosKey | |
apiHost = [string]$duoApiHost | |
directory_key = [string]$duoDirID | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment