Skip to content

The Org: is not defined in the Duo_org.ps1 file #50

Description

@Boston-of-Gilead

C:\windows\system32> $user = duoGetUser -username user
cmdlet _duoBuildCall at command pipeline position 1
Supply values for the following parameters:
dOrg: enc
_duoBuildCall : Cannot validate argument on parameter 'dOrg'. The Org:enc is not defined in the Duo_org.ps1 file

^^^ Since I didn't specify an org, shouldn't it default to $dOrg.

I get the same error for $user = duoGetUser -username user -dOrg $dOrg.

When I don't put anything into the prompt, it says Org is an empty string:

C:\windows\system32> $user = duoGetUser -username user -dOrg $dOrg
cmdlet _duoBuildCall at command pipeline position 1
Supply values for the following parameters:
dOrg:
_duoBuildCall : Cannot validate argument on parameter 'dOrg'. Cannot bind argument to parameter 'org' because it is an empty string.
At C:\Program Files\WindowsPowerShell\Modules\Duo\Duo.psm1:591 char:20

  • ... $request = _duoBuildCall -method $method -path $path -parameters $pa ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [_duoBuildCall], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,_duoBuildCall

Here are my variables:

C:\windows\system32> $dOrg
enc

C:\windows\system32> $DuoDefaultOrg
enc

C:\windows\system32> $DuoOrgs

Name Value


unc {apiHost, directory_key, sKey, iKey}
enc {apiHost, directory_key, sKeyEnc, iKey}

Here's my Duo_org.ps1 file:

<# Duo_org.ps1 #>

[string]$DuoDefaultOrg = 'enc'

[Hashtable]$DuoOrgs = @{
unc = [Hashtable]@{
iKey = [string]"XXX"
sKey = [string]"XXX"
apiHost = [string]"api-XXX.duosecurity.com"
directory_key = [string]"XXX"
}
enc = [Hashtable]@{
iKey = [string]"XXX"
sKeyEnc = [string]"Big long key from duoEncsKey"
apiHost = [string]"api-XXX.duosecurity.com"
directory_key = [string]"XXX"
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions