dnewsholme / PasswordState-Management

Powershell Module For Management of Passwordstate. (Powershell Core Compatible)
GNU General Public License v3.0
39 stars 14 forks source link

Defect: Reason header is not used when invoking password requests on list requiring header #142

Closed trir262 closed 3 years ago

trir262 commented 3 years ago

Hi Daryl,

Recently all our passwordstate Lists were modified and 'provide a reason when using api' was checked on all of them. I know 'reason' is a parameter however it turns out it is not yet correctly parsed and sent to PasswordState.

Script:

Get-PasswordStateEnvironment | Out-Null
Get-PasswordStatePassword -PasswordID 80

Expected outcome: the data for password id 80 Actual outcome: PowerShell Error:

OperationStopped:
Line |
 158 |              Throw $_.Exception
     |              ~~~~~~~~~~~~~~~~~~
     | Response status code does not indicate success: 401 ([{"errors":[{"message":"No Authorization"},{"phrase":"PasswordListID '81' is configured so the Reason Header Attribute is mandatory, but it has not been specified."}]}]).

I am working on a fix but thought I'd already let you know