Update Remove Local Administrators policy via API

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

Update Remove Local Administrators policy via API

L0 Member

Hello guys,

 

When I try to update the local administrator removal policy, I receive the following error below when I try to pass the following parameters: Executors: ["HOSTNAME1"], Accounts: ["Domain\AD_GROUP"]

 

[

  {

    "Fields": [

      "Executors[0]"

    ],

    "ErrorCode": "EPM000002E",

    "ErrorMessage": "JSON parsing error."

  },

  {

    "Fields": [

      "Accounts[0]"

    ],

    "ErrorCode": "EPM000002E",

    "ErrorMessage": "JSON parsing error."

  }

]

 

I'm passing this in my body request

 

{

    "Id": "c941dd32-767e-4a27-8714-c2024fa72ad9",

    "Name": "Remove local admin rights",

    "PolicyType": 46,

    "Action": 23,

    "Executors": ["HOSTNAME1"],    

    "IsAppliedToAllComputers": true,

    "Accounts": ["DOMAIN\\AD_GROUP"],

    "IncludeADComputerGroups": [],

    "IsActive": true,

    "LinkedAgentPolicies": []

}

 

When I send the request without providing a hostname or AD group, the sending is successful

 

Has anyone ever had similar behavior and know how to solve it?

2 REPLIES 2

L4 Transporter

Hi @Marcel Barreto​ 

 

As the community has not answered this question for some time, could you kindly share if you could resolve this issue and how?

If the issue is still relevant, I would advise raising a ticket with our Support team for further assistance.

 

Thanks,

Niv

L0 Member

I didn't find a solution, I think the documentation about this API need to be updated with some detailed examples at https://docs.cyberark.com/EPM/Latest/en/Content/WebServices/RemoveLocalAdmin.htm

  • 223 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!