Using the API to export all Platforms, fails with an error 500

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Using the API to export all Platforms, fails with an error 500

L1 Bithead

Using psPAS module, and indeed when using the API calls directly there doesn't appear to be a way to retrieve all installed Platforms.

 

Get-PASPlatform

Invoke-PASRestMethod:

Line |

130 | … $result = Invoke-PASRestMethod -Uri $URI -Method GET -WebSession $S …

| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

| [500] The given key was not present in the dictionary.

 

$s = Get-PASSession

 

$Request = @{

"Method" = "GET"

"Uri" = "$($s.BaseUri)/API/Platforms"

"WebSession" = $s.WebSession

"ContentType" = "application/json"

}

 

Invoke-RestMethod @Request

Invoke-RestMethod: {"ErrorCode":"CAWS00001E","ErrorMessage":"The given key was not present in the dictionary."}

 

 

However, I have found that if you Export all your accounts, and select the unique Platform IDs, you can collect the platform details:

 

Get-PASAccount |select PlatformID -unique| Get-PASPlatform |Select -expand details|Export-Excel Platforms.xlsx -BoldTopRow -AutoSize -AutoFilter -FreezeTopRow -NoNumberConversion UnrecoverableErrors,RCReconcileReasons

 

Thought I would share as a workaround until CyberArk fixes the API/Platforms reset api

2 REPLIES 2

L6 Presenter

Which CyberArk version is being used?

L1 Bithead

I'm using 11.4 PVWA. The Get-PSPlatforms issues of gathering all platforms is the same as in this closed issue.

  • 518 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!