Global Protect Client Passcode Modification using API

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Please sign in to see details of an important advisory in our Customer Advisories area.

Global Protect Client Passcode Modification using API

L0 Member

Hi Everyone,


I am trying to modify the passcode of Global Protect Client. But I am unable to figure out what should be the element which needs to pass in the command. I have tried to set passcode directly using <passcode>54321</passcode> element. But it is throwing an error "may need to override template object first"



Please find the below sample code Invoke-PaApiConfig -Set -Element "<passcode>54321</passcode>" -XPath "/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/global-protect/global-protect-portal/entry[@name='test_portal']/client-config/configs/entry[@name='gp_config']/agent-ui/passcode"


Here I am using PowerShell to connect the device and do the modification. I am able to get the details with the above Xpath. But I am unable to SET. 


Could you please help me with "element" which needs to be used to update passcode



When I use get I am getting the following response:

<response status="success" code="19">
<result total-count="1" count="1">




  • 0 replies
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!