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

Search-TssSecret, -ExtendedField parameter does not return values for those fields in returned object #394

Open
jross-ent-com opened this issue Feb 6, 2024 · 0 comments
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@jross-ent-com
Copy link

jross-ent-com commented Feb 6, 2024

Verified issue does not already exist?

Yes

What error did you receive

Not an error, but missing data.

When passing in the -ExtendedField parameter, it does not return the values from the requested fields.
This appears to be caused by a typo in the filter builder.

$filters += "filter.extendedField=$v"

                    $filters += "filter.extendedField=$v"

However, according to the underlying API docs
https://updates.thycotic.net/secretserver/restapiguide/11.6.3/WinAuth/#tag/Secrets/operation/SecretsService_SearchV2
Search Secret should want the field to be referenced as

filter.extendedFields
not as
filter.extendedField

Please run the command using -Verbose

$nvsecrets = Search-TssSecret -TssSession $ssess -FolderId $nvfolder.Id -ExtendedField $ef -Verbose VERBOSE: Command invocation: Search-TssSecret -TssSession:TssSessionObject -FolderId:TssSessionObject -ExtendedField:TssSessionObject -Verbose:True VERBOSE: Filters: filter.folderId=123&filter.extendedField=FQDN&filter.extendedField=NVRLocation VERBOSE: Performing the operation GET https://secret.private.domain.com/SecretServer/api/v1/secrets?sortBy[0].direction=asc&sortBy[0].name=Name&take=2147483647&filter.includeRestricted=true&filter.folderId=680&filter.extendedField=FQDN&filter.extendedField=NVRLocation

Provide a test case or steps to reproduce

Updated my cached copy of Search-TssSecret.ps1 to use filter.extendedFields and it shows the fields in a | Format-List now.

Expected behavior

ExtendedFields property should have values

Active : True
AutoChangeEnabled : False
CheckedOut : False
CheckOutEnabled : False
CreateDate : 1/10/2024 7:39:43 PM
DaysUntilExpiration : 0
DoubleLockEnabled : False
ExtendedFields : {FQDN, NVRLocation}
FolderId : 123
HasLauncher : False
HidePassword : False

What Edition of Secret Server?

Professional

What version of Secret Server

Current GA release

What PowerShell host was used when producing this error

PowerShell Core (pwsh)

PowerShell Host Version

7.4.1

@jross-ent-com jross-ent-com added bug Something isn't working triage needed new issues that are still in state of triage labels Feb 6, 2024
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