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

Search-TssFolderPermission Error

Open jmackxiii opened this issue 5 months ago • 0 comments

Verified issue does not already exist?

Yes

What error did you receive

I am working on an Audit script and I need to pull permissions of Folders so we can pull contact Info from them on our side, long story short in testing, when I try to use the Search-TssFolderPermission command. I get this error dump.

Search-TssFolderPermission -TssSession $session -folderid 5206 Cannot convert value "@{id=20967; folderId=5206; groupId=9; groupName=OCT_Admins; userId=; userName=; folderAccessRoleId=10; folderAccessRoleName=Owner; secretAccessRoleId=11; secretAccessRoleName=Owner; knownAs=OCT_Admins; domainName=}" to type "Thycotic.PowerShell.FolderPermissions.Permission". Error: "Cannot convert the "@{id=20967; folderId=5206; groupId=9; groupName=OCT_Admins; userId=; userName=; folderAccessRoleId=10; folderAccessRoleName=Owner; secretAccessRoleId=11; secretAccessRoleName=Owner; knownAs=OCT_Admins; domainName=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.FolderPermissions.Permission"." At C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.61.0\functions\folder-permissions\Search-TssFolderPermission.ps1:94 char:21

  • ... [Thycotic.PowerShell.FolderPermissions.Permission[]]$rest ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvalidCastConstructorException

Please run the command using -Verbose

Search-TssFolderPermission -TssSession $session -folderid 5206 -verbose VERBOSE: Command invocation: Search-TssFolderPermission -TssSession:TssSessionObject -FolderId:TssSessionObject -Verbose:True VERBOSE: Filters: filter.folderId=5206 VERBOSE: Performing the operation GET https://oct.secretservercloud.com/api/v1/folder-permissions?sortBy[0].direction=asc&sortBy[0].name=Id&take=2147483647&filter.folderId=5206 Cannot convert value "@{id=20967; folderId=5206; groupId=9; groupName=OCT_Admins; userId=; userName=; folderAccessRoleId=10; folderAccessRoleName=Owner; secretAccessRoleId=11; secretAccessRoleName=Owner; knownAs=OCT_Admins; domainName=}" to type "Thycotic.PowerShell.FolderPermissions.Permission". Error: "Cannot convert the "@{id=20967; folderId=5206; groupId=9; groupName=OCT_Admins; userId=; userName=; folderAccessRoleId=10; folderAccessRoleName=Owner; secretAccessRoleId=11; secretAccessRoleName=Owner; knownAs=OCT_Admins; domainName=}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.FolderPermissions.Permission"." At C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.61.0\functions\folder-permissions\Search-TssFolderPermission.ps1:94 char:21

  • ... [Thycotic.PowerShell.FolderPermissions.Permission[]]$rest ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvalidCastConstructorException

Provide a test case or steps to reproduce

Trying to run Search-TssFolderPermission -TssSession $session -folderid 5206

Expected behavior

Expecting the permissions to be returned

What Edition of Secret Server?

Platinum

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.20348.2652
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2652
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

jmackxiii avatar Sep 23 '24 15:09 jmackxiii