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-TssDirectoryServiceSyncStatus fails to convert output to Thycotic.PowerShell.DirectoryServices.DomainSyncStatus object. #396

Open
premstad opened this issue Feb 16, 2024 · 1 comment
Labels
bug Something isn't working triage needed new issues that are still in state of triage

Comments

@premstad
Copy link

Verified issue does not already exist?

No

What error did you receive

InvalidArgument: C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.60.9\functions\directory-services\Get-TssDirectoryServiceSyncStatus.ps1:55
Line |
55 | … [Thycotic.PowerShell.DirectoryServices.SyncStatus]$restRe …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot convert value "@{estimatedPercentComplete=0; startDateTime=2/16/2024 5:07:16 PM; endDateTime=2/16/2024
| 5:07:23 PM; nextSynchronizationDateTime=2/16/2024 6:07:23 PM; errorCount=0; domainStatus=System.Object[]}" to
| type "Thycotic.PowerShell.DirectoryServices.SyncStatus". Error: "Cannot convert value "@{domainId=1;
| newUsersCreated=0; newUsersCreatedAsDisabled=0; usersRemovedFromGroups=0; usersWithGroupMembershipChanges=177;
| domainUsersUpdatedSinceLastSynchronization=0; disabledUsers=0; lastLogEntry=Created 0 users. Updated
| memberships for 177 users. Removed membership for 0 users. Disabled 0 users. 0 users were created as
| disabled. Re-enabled 0 users. }" to type "Thycotic.PowerShell.DirectoryServices.DomainSyncStatus". Error:
| "Cannot convert the "@{domainId=1; newUsersCreated=0; newUsersCreatedAsDisabled=0; usersRemovedFromGroups=0;
| usersWithGroupMembershipChanges=177; domainUsersUpdatedSinceLastSynchronization=0; disabledUsers=0;
| lastLogEntry=Created 0 users. Updated memberships for 177 users. Removed membership for 0 users. Disabled 0
| users. 0 users were created as disabled. Re-enabled 0 users. }" value of type
| "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.DirectoryServices.DomainSyncStatus".""

Please run the command using -Verbose

VERBOSE: Command invocation: Get-TssDirectoryServiceSyncStatus -TssSession:TssSessionObject -Verbose:True
VERBOSE: Performing the operation GET https://arrow.secretservercloud.com/api/v1/directory-services/synchronization
InvalidArgument: C:\Program Files\WindowsPowerShell\Modules\Thycotic.SecretServer\0.60.9\functions\directory-services\Get-TssDirectoryServiceSyncStatus.ps1:55
Line |
55 | … [Thycotic.PowerShell.DirectoryServices.SyncStatus]$restRe …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot convert value "@{estimatedPercentComplete=0; startDateTime=2/16/2024 5:07:16 PM; endDateTime=2/16/2024
| 5:07:23 PM; nextSynchronizationDateTime=2/16/2024 6:07:23 PM; errorCount=0; domainStatus=System.Object[]}" to
| type "Thycotic.PowerShell.DirectoryServices.SyncStatus". Error: "Cannot convert value "@{domainId=1;
| newUsersCreated=0; newUsersCreatedAsDisabled=0; usersRemovedFromGroups=0; usersWithGroupMembershipChanges=177;
| domainUsersUpdatedSinceLastSynchronization=0; disabledUsers=0; lastLogEntry=Created 0 users. Updated
| memberships for 177 users. Removed membership for 0 users. Disabled 0 users. 0 users were created as
| disabled. Re-enabled 0 users. }" to type "Thycotic.PowerShell.DirectoryServices.DomainSyncStatus". Error:
| "Cannot convert the "@{domainId=1; newUsersCreated=0; newUsersCreatedAsDisabled=0; usersRemovedFromGroups=0;
| usersWithGroupMembershipChanges=177; domainUsersUpdatedSinceLastSynchronization=0; disabledUsers=0;
| lastLogEntry=Created 0 users. Updated memberships for 177 users. Removed membership for 0 users. Disabled 0
| users. 0 users were created as disabled. Re-enabled 0 users. }" value of type
| "System.Management.Automation.PSCustomObject" to type "Thycotic.PowerShell.DirectoryServices.DomainSyncStatus".""

Provide a test case or steps to reproduce

  1. Install either Thycotic.SecretServer module version 0.60.9 or 0.61.8 (verified an issue on both, the error is the same)
  2. Run the following commands
  3. Import-Module Thycotic.SecretServer
  4. Get API token for your Admin user through SS portal
  5. Save token in a variable, i.e. $Token = "the pasted token string from SS portal"
  6. $SSsession = New-TssSession -SecretServer -AccessToken $Token
  7. Get-TssDirectoryServiceSyncStatus -TssSession $SSsession

Expected behavior

For the command to run and return the synchronization status.

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.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

@premstad premstad added bug Something isn't working triage needed new issues that are still in state of triage labels Feb 16, 2024
@tylerezimmerman
Copy link
Contributor

@premstad we will take a look at this issue.

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

2 participants