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-TssFolderPermission Error #407

Open
jmackxiii opened this issue Sep 23, 2024 · 0 comments
Open

Search-TssFolderPermission Error #407

jmackxiii opened this issue Sep 23, 2024 · 0 comments
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@jmackxiii
Copy link

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 jmackxiii added bug Something isn't working triage needed new issues that are still in state of triage labels Sep 23, 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