thycotic.secretserver icon indicating copy to clipboard operation
thycotic.secretserver copied to clipboard

Search-TssSecret error

Open jmackxiii opened this issue 11 months ago • 3 comments

Verified issue does not already exist?

Yes

What error did you receive

Search-TssSecret -TssSession $session -SecretName 'synapsevd'

Cannot convert value "@{id=111452; name=AH-Atriuishealth.net\synapsevd; secretTemplateId=6191; secretTemplateName=AH-AD_Service_Accounts; folderId=5290; folderPath=\AH\IT\Management Accounts\Service Accounts; siteId=46; active=True; checkedOut=False; isRestricted=False; isOutOfSync=False; outOfSyncReason=; lastHeartBeatStatus=Success; lastPasswordChangeAttempt=0001-01-01T00:00:00; responseCodes=; lastAccessed=; extendedFields=; checkOutEnabled=False; autoChangeEnabled=False; doubleLockEnabled=False; requiresApproval=False; requiresComment=False; inheritsPermissions=False; hidePassword=False; createDate=2022-08-08T17:46:23; daysUntilExpiration=106; hasLauncher=True; checkOutUserId=-1; checkOutUserName=}" to type "Thycotic.PowerShell.Secrets.Summary". Error: "Cannot convert the "@{id=111452; name=AH-Atriuishealth.net\synapsevd; secretTemplateId=6191; secretTemplateName=AH-AD_Service_Accounts; folderId=5290; folderPath=\AH\IT\Management Accounts\Service Accounts; siteId=46; active=True; checkedOut=False; isRestricted=False; isOutOfSync=False; outOfSyncReason=; lastHeartBeatStatus=Success; lastPasswordChangeAttempt=0001-01-01T00:00:00; responseCodes=; lastAccessed=; extendedFields=; checkOutEnabled=False; autoChangeEnabled=False; doubleLockEnabled=False; requiresApproval=False; requiresComment=False; inheritsPermissions=False; hidePassword=False; createDate=2022-08-08T17:46:23; daysUntilExpiration=106; hasLauncher=True; checkOutUserId=-1; checkOutUserName=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Secrets.Summary"." At C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.61.0\functions\secrets\Search-TssSecret.ps1:274 char:17

  • ... [Thycotic.PowerShell.Secrets.Summary[]]$restResponse.reco ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvalidCastConstructorException

Please run the command using -Verbose

VERBOSE: Command invocation: Search-TssSecret -TssSession:TssSessionObject -SearchText:synapsevd -Verbose:True VERBOSE: Filters: filter.searchText=synapsevd VERBOSE: Performing the operation GET https://oct.secretservercloud.com/api/v1/secrets?sortBy[0].direction=asc&sortBy[0].name=Name&take=2147483647&filter.includeRestricted=true&filter.searchText=synapsevd Cannot convert value "@{id=111452; name=AH-Atriuishealth.net\synapsevd; secretTemplateId=6191; secretTemplateName=AH-AD_Service_Accounts; folderId=5290; folderPath=\AH\IT\Management Accounts\Service Accounts; siteId=46; active=True; checkedOut=False; isRestricted=False; isOutOfSync=False; outOfSyncReason=; lastHeartBeatStatus=Success; lastPasswordChangeAttempt=0001-01-01T00:00:00; responseCodes=; lastAccessed=; extendedFields=; checkOutEnabled=False; autoChangeEnabled=False; doubleLockEnabled=False; requiresApproval=False; requiresComment=False; inheritsPermissions=False; hidePassword=False; createDate=2022-08-08T17:46:23; daysUntilExpiration=105; hasLauncher=True; checkOutUserId=-1; checkOutUserName=}" to type "Thycotic.PowerShell.Secrets.Summary". Error: "Cannot convert the "@{id=111452; name=AH-Atriuishealth.net\synapsevd; secretTemplateId=6191; secretTemplateName=AH-AD_Service_Accounts; folderId=5290; folderPath=\AH\IT\Management Accounts\Service Accounts; siteId=46; active=True; checkedOut=False; isRestricted=False; isOutOfSync=False; outOfSyncReason=; lastHeartBeatStatus=Success; lastPasswordChangeAttempt=0001-01-01T00:00:00; responseCodes=; lastAccessed=; extendedFields=; checkOutEnabled=False; autoChangeEnabled=False; doubleLockEnabled=False; requiresApproval=False; requiresComment=False; inheritsPermissions=False; hidePassword=False; createDate=2022-08-08T17:46:23; daysUntilExpiration=105; hasLauncher=True; checkOutUserId=-1; checkOutUserName=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Secrets.Summary"." At C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.61.0\functions\secrets\Search-TssSecret.ps1:274 char:17

  • ... [Thycotic.PowerShell.Secrets.Summary[]]$restResponse.reco ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvalidCastConstructorException

Provide a test case or steps to reproduce

Trying to run a Search on a secret that we have access to and is a valid secret.

Expected behavior

To return details on the secret searched for.

What Edition of Secret Server?

Cloud Subscription

What version of Secret Server

Secret Server Cloud

What PowerShell host was used when producing this error

Windows PowerShell ISE (powershell_ise)

PowerShell Host Version

Name Value


PSVersion 5.1.14393.6343
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.6343
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

jmackxiii avatar Mar 13 '24 12:03 jmackxiii

Cannot validate error using module 0.61.8 and SSC US

jagger avatar Mar 22 '24 20:03 jagger

Sadly this is happening with our version of the module. We are also stuck with using this version for the time being too as it is tied to our PS version. Happy to provide what I can on this end if you think any additional information will help.

jmackxiii avatar Mar 25 '24 13:03 jmackxiii

We had the same issue with version 0.60.6 of the module, upgrading to 0.61.8 fixed it for us.

$PSversiontable

Name                           Value
----                           -----
PSVersion                      7.4.4
PSEdition                      Core
GitCommitId                    7.4.4
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

We're using on prem with version 11.7.000002

kjetils-labs avatar Aug 07 '24 14:08 kjetils-labs