Closed G-o43im closed 1 year ago
Yes
Cannot convert value "@{id=254; userName=admin12345@blah.com; displayName=admin12345@blah.com; lastLogin=2022-08-05T16:09:52; created=2020-07-18T09:59:55; enabled=True; loginFailures=0; emailAddress=admin_hires_test@blah.com; domainId=-1; domainName=; isLockedOut=False; isApplicationAccount=False; twoFactorMethod=None; externalUserSource=ThycoticOne; platformIntegrationType=None}" to type "blah.PowerShell.Users.Summary". Error: "Cannot convert the "@{id=254; userName=admin12345@blah.com; displayName=admin12345@blah.com; lastLogin=2022-08-05T16:09:52; created=2020-06-02T09:59:55; enabled=True; loginFailures=0; emailAddress=admin_hires_test@blah.com; domainId=-1; domainName=; isLockedOut=False; isApplicationAccount=False; twoFactorMethod=None; externalUserSource=ThycoticOne; platformIntegrationType=None}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Users.Summary"." At C:\Users\gmccall.DELINEA\OneDrive - Delinea\Documents\WindowsPowerShell\Modules\Thycotic.SecretServer\0.60.7\functions\users\Search-TssUser.ps1:105 char:17
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException + FullyQualifiedErrorId : InvalidCastConstructorException
VERBOSE: Command invocation: Search-TssUser -TssSession:TssSessionObject -Verbose:True VERBOSE: Performing the operation GET https://thycotictechsupport.secretservercloud.com/api/v1/users?sortBy[0].direction=asc&sortBy[0].name=DisplayName&take=2147483647 with: Cannot convert value "@{id=254; userName=admin12345@blah.com; displayName=admin12345@blah.com; lastLogin=2022-08-05T16:09:52; created=2020-07-18T09:59:55; enabled=True; loginFailures=0; emailAddress=admin_hires_test@blah.com; domainId=-1; domainName=; isLockedOut=False; isApplicationAccount=False; twoFactorMethod=None; externalUserSource=ThycoticOne; platformIntegrationType=None}" to type "blah.PowerShell.Users.Summary". Error: "Cannot convert the "@{id=254; userName=admin12345@blah.com; displayName=admin12345@blah.com; lastLogin=2022-08-05T16:09:52; created=2020-06-02T09:59:55; enabled=True; loginFailures=0; emailAddress=admin_hires_test@blah.com; domainId=-1; domainName=; isLockedOut=False; isApplicationAccount=False; twoFactorMethod=None; externalUserSource=ThycoticOne; platformIntegrationType=None}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Users.Summary"." At C:\Users\gmccall.DELINEA\OneDrive - Delinea\Documents\WindowsPowerShell\Modules\Thycotic.SecretServer\0.60.7\functions\users\Search-TssUser.ps1:105 char:17
Run the following, fill in with information from your own Secret Server Cloud instance:
$username = 'UsernameHere' $password = ConvertTo-SecureString -String 'PasswordHere' -AsPlainText -Force $cred = [pscredential]::new($username,$password)
$session = New-TssSession -SecretServer https://thycotictechsupport.secretservercloud.com -Credential $cred
Search-TssUser -TssSession $session -Verbose
It's expected that the cmdlet would return user information.
Cloud Subscription
EA release
Windows PowerShell ISE (powershell_ise)
Name Value
PSVersion 5.1.19041.1682 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.1682 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
It appears that the Thycotic.PowerShell.Users.User class needs the following attributes added
personalGroupId platformIntegrationType
Tested against 11.2.000009 (GA SSC)
Fixed in current release
Verified issue does not already exist?
Yes
What error did you receive
Cannot convert value "@{id=254; userName=admin12345@blah.com; displayName=admin12345@blah.com; lastLogin=2022-08-05T16:09:52; created=2020-07-18T09:59:55; enabled=True; loginFailures=0; emailAddress=admin_hires_test@blah.com; domainId=-1; domainName=; isLockedOut=False; isApplicationAccount=False; twoFactorMethod=None; externalUserSource=ThycoticOne; platformIntegrationType=None}" to type "blah.PowerShell.Users.Summary". Error: "Cannot convert the "@{id=254; userName=admin12345@blah.com; displayName=admin12345@blah.com; lastLogin=2022-08-05T16:09:52; created=2020-06-02T09:59:55; enabled=True; loginFailures=0; emailAddress=admin_hires_test@blah.com; domainId=-1; domainName=; isLockedOut=False; isApplicationAccount=False; twoFactorMethod=None; externalUserSource=ThycoticOne; platformIntegrationType=None}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Users.Summary"." At C:\Users\gmccall.DELINEA\OneDrive - Delinea\Documents\WindowsPowerShell\Modules\Thycotic.SecretServer\0.60.7\functions\users\Search-TssUser.ps1:105 char:17
Please run the command using -Verbose
VERBOSE: Command invocation: Search-TssUser -TssSession:TssSessionObject -Verbose:True VERBOSE: Performing the operation GET https://thycotictechsupport.secretservercloud.com/api/v1/users?sortBy[0].direction=asc&sortBy[0].name=DisplayName&take=2147483647 with: Cannot convert value "@{id=254; userName=admin12345@blah.com; displayName=admin12345@blah.com; lastLogin=2022-08-05T16:09:52; created=2020-07-18T09:59:55; enabled=True; loginFailures=0; emailAddress=admin_hires_test@blah.com; domainId=-1; domainName=; isLockedOut=False; isApplicationAccount=False; twoFactorMethod=None; externalUserSource=ThycoticOne; platformIntegrationType=None}" to type "blah.PowerShell.Users.Summary". Error: "Cannot convert the "@{id=254; userName=admin12345@blah.com; displayName=admin12345@blah.com; lastLogin=2022-08-05T16:09:52; created=2020-06-02T09:59:55; enabled=True; loginFailures=0; emailAddress=admin_hires_test@blah.com; domainId=-1; domainName=; isLockedOut=False; isApplicationAccount=False; twoFactorMethod=None; externalUserSource=ThycoticOne; platformIntegrationType=None}" value of type "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.Users.Summary"." At C:\Users\gmccall.DELINEA\OneDrive - Delinea\Documents\WindowsPowerShell\Modules\Thycotic.SecretServer\0.60.7\functions\users\Search-TssUser.ps1:105 char:17
Provide a test case or steps to reproduce
Run the following, fill in with information from your own Secret Server Cloud instance:
$username = 'UsernameHere' $password = ConvertTo-SecureString -String 'PasswordHere' -AsPlainText -Force $cred = [pscredential]::new($username,$password)
$session = New-TssSession -SecretServer https://thycotictechsupport.secretservercloud.com -Credential $cred
Search-TssUser -TssSession $session -Verbose
Expected behavior
It's expected that the cmdlet would return user information.
What Edition of Secret Server?
Cloud Subscription
What version of Secret Server
EA release
What PowerShell host was used when producing this error
Windows PowerShell ISE (powershell_ise)
PowerShell Host Version
Name Value
PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1