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

Get-TssUserGroup - Error : Invalid Argument #417

Open
apsyka93 opened this issue Feb 19, 2025 · 0 comments
Open

Get-TssUserGroup - Error : Invalid Argument #417

apsyka93 opened this issue Feb 19, 2025 · 0 comments
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@apsyka93
Copy link

Verified issue does not already exist?

Yes

What error did you receive

PS C:\temp> $error[0] | select *

PSMessageDetails :
Exception : System.Management.Automation.RuntimeException: Cannot convert value "@{userId=3; userName=[email protected];
displayName=; userDomainId=-1; userDomainName=; groupId=1; groupName=All Vault Users; groupDomainId=-1; groupDomainName=;
enabled=False; isPlatform=False; isEditable=False}" to type "Thycotic.PowerShell.Groups.UserSummary". Error: "Cannot convert the
"@{userId=3; userName=[email protected]; displayName=; userDomainId=-1; userDomainName=; groupId=1; groupName=All Vault
Users; groupDomainId=-1; groupDomainName=; enabled=False; isPlatform=False; isEditable=False}" value of type
"System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Groups.UserSummary"."
---> System.Management.Automation.PSInvalidCastException: Cannot convert value "@{userId=3; userName=[email protected];
displayName=; userDomainId=-1; userDomainName=; groupId=1; groupName=All Vault Users; groupDomainId=-1; groupDomainName=;
enabled=False; isPlatform=False; isEditable=False}" to type "Thycotic.PowerShell.Groups.UserSummary". Error: "Cannot convert the
"@{userId=3; userName=[email protected]; displayName=; userDomainId=-1; userDomainName=; groupId=1; groupName=All Vault
Users; groupDomainId=-1; groupDomainName=; enabled=False; isPlatform=False; isEditable=False}" value of type
"System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Groups.UserSummary"."
---> System.Management.Automation.PSInvalidCastException: Cannot convert the "@{userId=3; userName=[email protected];
displayName=; userDomainId=-1; userDomainName=; groupId=1; groupName=All Vault Users; groupDomainId=-1; groupDomainName=;
enabled=False; isPlatform=False; isEditable=False}" value of type "System.Management.Automation.PSCustomObject" to type
"Thycotic.PowerShell.Groups.UserSummary".
---> System.InvalidOperationException: The property 'isPlatform' was not found for the 'Thycotic.PowerShell.Groups.UserSummary'
object. The settable properties are: [DisplayName <System.String>], [Enabled <System.Boolean>], [GroupDomainId <System.Int32>],
[GroupDomainName <System.String>], [GroupId <System.Int32>], [GroupName <System.String>], [UserDomainId <System.Int32>],
[UserDomainName <System.String>], [UserId <System.Int32>], [Username <System.String>].
at System.Management.Automation.LanguagePrimitives.CreateMemberNotFoundError(PSObject pso, DictionaryEntry property, Type resultType)
at System.Management.Automation.LanguagePrimitives.SetObjectProperties(Object o, IDictionary properties, Type resultType,
MemberNotFoundError memberNotFoundErrorAction, MemberSetValueError memberSetValueErrorAction, Boolean enableMethodCall, IFormatProvider
formatProvider, Boolean recursion, Boolean ignoreUnknownMembers)
at System.Management.Automation.LanguagePrimitives.SetObjectProperties(Object o, PSObject psObject, Type resultType,
MemberNotFoundError memberNotFoundErrorAction, MemberSetValueError memberSetValueErrorAction, IFormatProvider formatProvider, Boolean
recursion, Boolean ignoreUnknownMembers)
--- End of inner exception stack trace ---
at System.Management.Automation.LanguagePrimitives.SetObjectProperties(Object o, PSObject psObject, Type resultType,
MemberNotFoundError memberNotFoundErrorAction, MemberSetValueError memberSetValueErrorAction, IFormatProvider formatProvider, Boolean
recursion, Boolean ignoreUnknownMembers)
at System.Management.Automation.LanguagePrimitives.ConvertViaNoArgumentConstructor.Convert(Object valueToConvert, Type resultType,
Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable, Boolean ignoreUnknownMembers)
--- End of inner exception stack trace ---
at System.Management.Automation.LanguagePrimitives.ConvertViaNoArgumentConstructor.Convert(Object valueToConvert, Type resultType,
Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable, Boolean ignoreUnknownMembers)
at System.Management.Automation.LanguagePrimitives.ConvertViaNoArgumentConstructor.Convert(Object valueToConvert, Type resultType,
Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable)
at System.Management.Automation.LanguagePrimitives.ConvertTo(Object valueToConvert, Type resultType, Boolean recursion,
IFormatProvider formatProvider, TypeTable backupTypeTable)
at System.Management.Automation.LanguagePrimitives.ConvertUnrelatedArrays(Object valueToConvert, Type resultType, Boolean recursion,
PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable)
at CallSite.Target(Closure, CallSite, Object)
at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
--- End of inner exception stack trace ---
TargetObject :
CategoryInfo : InvalidArgument: (:) [], RuntimeException
FullyQualifiedErrorId : InvalidCastConstructorException
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Get-TssUserGroup, C:\Program Files\PowerShell\Modules\Thycotic.SecretServer\0.61.8\functions\users\Get-TssUserGroup.ps1:
line 68
at , : line 1
PipelineIterationInfo : {}

Please run the command using -Verbose

VERBOSE: Command invocation: Get-TssUserGroup -TssSession:TssSessionObject -Id:System.Int32[] -Verbose:True
VERBOSE: Performing the operation GET https://fdgroup.secretservercloud.eu/api/v1/users/3/groups?sortBy[0].direction=asc&sortBy[0].name=GroupId&take=2147483647
InvalidArgument: C:\Program Files\PowerShell\Modules\Thycotic.SecretServer\0.61.8\functions\users\Get-TssUserGroup.ps1:68:21
Line |
68 | … [Thycotic.PowerShell.Groups.UserSummary[]]$restREsponse.r …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot convert value "@{userId=3; userName=[email protected]; displayName=; userDomainId=-1; userDomainName=; groupId=1; groupName=All
| Vault Users; groupDomainId=-1; groupDomainName=; enabled=False; isPlatform=False; isEditable=False}" to type "Thycotic.PowerShell.Groups.UserSummary".
| Error: "Cannot convert the "@{userId=3; userName=[email protected]; displayName=; userDomainId=-1; userDomainName=; groupId=1;
| groupName=All Vault Users; groupDomainId=-1; groupDomainName=; enabled=False; isPlatform=False; isEditable=False}" value of type
| "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Groups.UserSummary"."

Provide a test case or steps to reproduce

Just using the command Get-TssUserGroup -TssSession $session -Id gives an error

Expected behavior

Expected to get the groups of a user

What Edition of Secret Server?

Platinum

What version of Secret Server

Secret Server Cloud

What PowerShell host was used when producing this error

PowerShell Core (pwsh)

PowerShell Host Version

Name Value


PSVersion 7.4.0
PSEdition Core
GitCommitId 7.4.0
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

@apsyka93 apsyka93 added bug Something isn't working triage needed new issues that are still in state of triage labels Feb 19, 2025
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