Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TssSecretPasswordStatus Error: Cannot convert value ... #406

Open
dionrowney opened this issue Sep 4, 2024 · 1 comment
Open

TssSecretPasswordStatus Error: Cannot convert value ... #406

dionrowney opened this issue Sep 4, 2024 · 1 comment
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@dionrowney
Copy link

dionrowney commented Sep 4, 2024

Verified issue does not already exist?

Yes

What error did you receive

Running

 TssSecretPasswordStatus -TssSession $session -Id 8251

returns

InvalidArgument: C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.61.8\functions\secrets\Get-TssSecretPasswordStatus.ps1:65
Line |
  65 |  …             [Thycotic.PowerShell.Secrets.PasswordStatus]$restResponse …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot convert value "@{status=Fail; lastRpcDate=9/4/2024 4:19:17 PM; rpcMessage=Unable to successfully connect to the server.; failedAttempts=5; nextRpcDate=9/4/2024 4:20:17 PM; failedDependency=}" to
     | type "Thycotic.PowerShell.Secrets.PasswordStatus". Error: "Cannot convert the "@{status=Fail; lastRpcDate=9/4/2024 4:19:17 PM; rpcMessage=Unable to successfully connect to the server.;
     | failedAttempts=5; nextRpcDate=9/4/2024 4:20:17 PM; failedDependency=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Secrets.PasswordStatus"."

Please run the command using -Verbose

PS C:\Users\redacted\Documents\PowerShell\Scripts\CriticalPasswords> TssSecretPasswordStatus -TssSession $session -Id 8251 -Verbose
VERBOSE: [Get-TssSecretPasswordStatus] calling an internal endpoint.
VERBOSE: Command invocation: TssSecretPasswordStatus -TssSession:TssSessionObject -Id:System.Int32[] -Verbose:True
VERBOSE: Performing the operation GET https://hostname-redacted/SecretServer/internals/secret-detail/8251/password-status
InvalidArgument: C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.61.8\functions\secrets\Get-TssSecretPasswordStatus.ps1:65
Line |
  65 |  …             [Thycotic.PowerShell.Secrets.PasswordStatus]$restResponse …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot convert value "@{status=Fail; lastRpcDate=9/4/2024 4:24:54 PM; rpcMessage=Unable to successfully connect to the server.; failedAttempts=8; nextRpcDate=9/4/2024 4:25:54 PM; failedDependency=}" to
     | type "Thycotic.PowerShell.Secrets.PasswordStatus". Error: "Cannot convert the "@{status=Fail; lastRpcDate=9/4/2024 4:24:54 PM; rpcMessage=Unable to successfully connect to the server.;
     | failedAttempts=8; nextRpcDate=9/4/2024 4:25:54 PM; failedDependency=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Secrets.PasswordStatus"."

Provide a test case or steps to reproduce

TssSecretPasswordStatus -TssSession $session -Id 8251

Expected behavior

Should return valid powershell object with fields etc.

What Edition of Secret Server?

Professional

What version of Secret Server

Current GA release

What PowerShell host was used when producing this error

Windows PowerShell (powershell)

PowerShell Host Version

$PSVersionTable

Name Value


PSVersion 7.4.5
PSEdition Core
GitCommitId 7.4.5
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

@dionrowney dionrowney added bug Something isn't working triage needed new issues that are still in state of triage labels Sep 4, 2024
@dionrowney
Copy link
Author

Until its fixed one appears to be able to use Invoke-TssRestApi cmdlet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage needed new issues that are still in state of triage
Projects
None yet
Development

No branches or pull requests

1 participant