Search-TssSecret, -ExtendedField parameter does not return values for those fields in returned object
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. https://github.com/thycotic-ps/thycotic.secretserver/blob/031304ca84f6a22f6df90cbc9e3288b33509b7bc/src/functions/secrets/Search-TssSecret.ps1#L241
$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