Skip to content

Module Requires PowerShell 6? #47

@robertlbyrne

Description

@robertlbyrne

Hi, many thanks for providing this module. A few issues below, mostly to do with error processing around line 491.

  • I believe this module requires PowerShell 6 due to this class: [Microsoft.PowerShell.Commands.HttpResponseException]. PowerShell 5.1 does not contain that class.

  • There are two typos involving this: X-Okta-Requst-Id

  • In the absence of $_.ErrorDetails.Message at line 502 (as I had for the moment to comment out the reference to the above class) this code can be used to nevertheless retrieve the helpful (even essential) Okta error message:

try
            {
                $sr = New-Object -TypeName System.IO.StreamReader($_.Exception.Response.GetResponseStream())
                $resp = $sr.ReadToEnd()
                $oktaException = ConvertFrom-Json -InputObject $resp
            }
            catch
            {
                $oktaException = $false
            }

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