sailpoint-oss / powershell-sdk

PowerShell Module for accessing SailPoint IdentityNow APIs
https://developer.sailpoint.com/
MIT License
21 stars 15 forks source link

Get-PasswordDictionary fails with InternalServerError #63

Closed BeejCyr closed 11 months ago

BeejCyr commented 1 year ago

When calling the Get-PasswordDictionary with no additional parameters, the call fails. Calling it with -Verbose reveals the following:

Get-PasswordDictionary -Verbose
VERBOSE: HTTP/1.1 POST with 0-byte payload
VERBOSE: received -byte response of content type application/json
VERBOSE: Request Headers: 
Name                           Value
----                           -----
User-Agent                     OpenAPI-Generator/1.1.3/ps
X-SailPoint-SDK                Powershell-1.1.3
Authorization                  Bearer <obfiscated>
Accept                         application/json

VERBOSE: Request Body: 
VERBOSE: HTTP/1.1 GET with 0-byte payload
VERBOSE: Retrying after interval of 5 seconds. Status code for previous attempt: InternalServerError
VERBOSE: Retrying after interval of 5 seconds. Status code for previous attempt: InternalServerError
tyler-mairose-sp commented 11 months ago

Hey @BeejCyr,

There was an issue with this function where the return type was not properly getting set to plain/text. A work-around for the currently released version v1.2.1 is to specify the return type like so Get-PasswordDictionary -ReturnType 'text/plain'. This is fixed in https://github.com/sailpoint-oss/powershell-sdk/commit/fcec46006126f1b3da4c70d2e29474374bf47757 and in future releases will be able to be called without specifying a -ReturnType.