Why can my API call show GlobalProtect users but cannot disconnect them?

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

Why can my API call show GlobalProtect users but cannot disconnect them?

L1 Bithead

Help Needed! I've been having this issue for a while now. I have a ticket open; yet, I am not able to get this API call to disconnect the connected GP gateway users. It's throwing me an 'invalid username' error each time, when I try to force-logout the user.

 

Any help spotting the issue is appreciated!

 

>>> kickOut = requests.get('https://labfirewall.example.com/api/?type=op&key=MYKEYHERE&cmd=<request><global-protect-gateway><client-logout><user>theuser</user><reason>force-logout</reason><gateway>Dummy_Gateway-N</gateway><computer>MACHINENAME</computer></client-logout></global-protect-gateway></request>')
>>> soup = bs(kickOut.content, 'html.parser')
>>> print(soup)
<response status="success"><result>
<response status="error">
<gateway>Dummy_Gateway-N</gateway>
<user>theuser</user>
<computer>MACHINENAME</computer>
<error>Invalid user name</error>
</response>
</result></response>
>>>
1 accepted solution

Accepted Solutions

L1 Bithead

I was missing the <domain>exampledomain</domain<> parameter in my API call

View solution in original post

1 REPLY 1

L1 Bithead

I was missing the <domain>exampledomain</domain<> parameter in my API call

  • 1 accepted solution
  • 3732 Views
  • 1 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!