<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Remove Remote User from Global Protect using XML API in GlobalProtect Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/remove-remote-user-from-global-protect-using-xml-api/m-p/582381#M5207</link>
    <description>&lt;P&gt;Thanks for the great info and the help&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/77347"&gt;@TomYoung&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I opened a ticket with support and they had me do the following which works for Prisma Access.&amp;nbsp; I had to add the computer name in base64 and the domain.&amp;nbsp; Once I added these to the XML API along with the username in base64 this worked to disconnect the client from the VPN.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A href="https://x.x.x.x/api/?type=op&amp;amp;cmd=" target="_blank" rel="noopener"&gt;https://x.x.x.x/api/?type=op&amp;amp;cmd=&lt;/A&gt;&lt;SPAN&gt;&amp;lt;request&amp;gt;&amp;lt;plugins&amp;gt;&amp;lt;cloud_services&amp;gt;&amp;lt;gpcs&amp;gt;&amp;lt;logout_mobile_user&amp;gt;&amp;lt;gateway&amp;gt;&amp;lt;computer&amp;gt;computernameinbase64&amp;lt;/computer&amp;gt;&amp;lt;domain&amp;gt;&lt;/SPAN&gt;&lt;A href="https://domain.com/" target="_blank" rel="noopener"&gt;domain.com&lt;/A&gt;&lt;SPAN&gt;&amp;lt;/domain&amp;gt;&amp;lt;user&amp;gt;usernameinbase64&amp;lt;/user&amp;gt; &amp;lt;/gateway&amp;gt;&amp;lt;/logout_mobile_user&amp;gt;&amp;lt;/gpcs&amp;gt;&amp;lt;/cloud_services&amp;gt;&amp;lt;/plugins&amp;gt;&amp;lt;/request&amp;gt;&amp;amp;key=&amp;lt;your_key&amp;gt;'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Only problem I am having now is the client automatically reconnects without having to reauth due to the Global Protect auth cookie.&amp;nbsp; Next step is to find a way to remove the GP cookie before killing the VPN.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2024 14:48:19 GMT</pubDate>
    <dc:creator>John_J</dc:creator>
    <dc:date>2024-04-02T14:48:19Z</dc:date>
    <item>
      <title>Remove Remote User from Global Protect using XML API</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/remove-remote-user-from-global-protect-using-xml-api/m-p/580082#M5117</link>
      <description>&lt;P&gt;I am trying to remove remote users from Global Protect using XML API.&amp;nbsp; I have attempted to remove a user from both the Gateway and the Portal but I have not been successful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This is the command I am using to remove the user from the Gateway:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;(Sections in bold are the changes I made to the XML API)&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" data-unlink="true"&gt;https://&lt;STRONG&gt;Firewall_Name&lt;/STRONG&gt;/api/?type=op&amp;amp;cmd=&amp;lt;request&amp;gt;&amp;lt;plugins&amp;gt;&amp;lt;cloud_services&amp;gt;&amp;lt;prisma-access&amp;gt;&amp;lt;logout_mobile_user&amp;gt;&amp;lt;gateway&amp;gt;&amp;lt;user&amp;gt;&lt;STRONG&gt;User_Name&lt;/STRONG&gt;&amp;lt;/user&amp;gt;&amp;lt;/gateway&amp;gt;&amp;lt;/logout_mobile_user&amp;gt;&amp;lt;/prisma-access&amp;gt;&amp;lt;/cloud_services&amp;gt;&amp;lt;/plugins&amp;gt;&amp;lt;/request&amp;gt;&amp;amp;key=&lt;STRONG&gt;xxxxAPIKeyxxxx&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" data-unlink="true"&gt;&lt;FONT size="4"&gt;This is the result I get from entering the above:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="John_J_0-1710258179570.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/58245iA1D04B58827BD3A3/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="John_J_0-1710258179570.png" alt="John_J_0-1710258179570.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;This is the command I am using to remove the user from the Portal:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;(Sections in bold are the changes I made to the XML API)&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" data-unlink="true"&gt;https://&lt;STRONG&gt;Firewall_Name&lt;/STRONG&gt;/api/?type=op&amp;amp;cmd=&amp;lt;request&amp;gt;&amp;lt;plugins&amp;gt;&amp;lt;cloud_services&amp;gt;&amp;lt;prisma-access&amp;gt;&amp;lt;logout_mobile_user&amp;gt;&amp;lt;portal&amp;gt;&amp;lt;user&amp;gt;&lt;STRONG&gt;User_Name&lt;/STRONG&gt;&amp;lt;/user&amp;gt;&amp;lt;/portal&amp;gt;&amp;lt;/logout_mobile_user&amp;gt;&amp;lt;/prisma-access&amp;gt;&amp;lt;/cloud_services&amp;gt;&amp;lt;/plugins&amp;gt;&amp;lt;/request&amp;gt;&amp;nbsp;&lt;SPAN&gt;&amp;amp;key=&lt;STRONG&gt;xxxxAPIKeyxxxx&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;" data-unlink="true"&gt;&lt;FONT size="4"&gt;This is the result I get from entering the above:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="John_J_1-1710258420581.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/58246iF9699CE816C29FD1/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="John_J_1-1710258420581.png" alt="John_J_1-1710258420581.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I use XML API to give me a count of connected users or to give me system info these XML API calls work and return the desired information.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do I need to change/add something else to the Gateway and Portal calls above?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 15:51:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/remove-remote-user-from-global-protect-using-xml-api/m-p/580082#M5117</guid>
      <dc:creator>John_J</dc:creator>
      <dc:date>2024-03-12T15:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Remote User from Global Protect using XML API</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/remove-remote-user-from-global-protect-using-xml-api/m-p/580468#M5131</link>
      <description>&lt;P&gt;Hello &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/182297"&gt;@John_J&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I totally missed that you were using Prisma Access in your January post.&amp;nbsp; I'm sorry.&amp;nbsp; You may be able to do it from Panorama.&amp;nbsp; &lt;A href="https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClamCAC" target="_blank"&gt;https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClamCAC&lt;/A&gt;&amp;nbsp; At least the GUI supports it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a VERY COOL trick.&amp;nbsp; If you know how to do it from the CLI, enable "debug cli on" and the NGFW will show you the XML syntax!&amp;nbsp; &lt;A href="https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api/use-the-cli-to-find-xml-api-syntax" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/11-0/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api/use-the-cli-to-find-xml-api-syntax&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the op cmd that worked for me on a regular NGFW.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;request&amp;gt;&amp;lt;global-protect-gateway&amp;gt;&amp;lt;client-logout&amp;gt;&amp;lt;gateway&amp;gt;Gateway-Name-N&amp;lt;/gateway&amp;gt;&amp;lt;domain&amp;gt;Domain&amp;lt;/domain&amp;gt;&amp;lt;user&amp;gt;Username&amp;lt;/user&amp;gt;&amp;lt;reason&amp;gt;force-logout&amp;lt;/reason&amp;gt;&amp;lt;computer&amp;gt;Computer-Name&amp;lt;/computer&amp;gt;&amp;lt;/client-logout&amp;gt;&amp;lt;/global-protect-gateway&amp;gt;&amp;lt;/request&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not like Prisma Access, but I HAD to put in the gateway-N name, domain, and user name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a couple suggestions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If you know how to do it from the CLI, use the debug to get the XML syntax.&lt;/LI&gt;
&lt;LI&gt;If not, compare the parameters from the output of the XML API show GP users, and try adding additional parameters like I had to.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I hope this helped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This thread&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 04:13:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/remove-remote-user-from-global-protect-using-xml-api/m-p/580468#M5131</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2024-03-15T04:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Remote User from Global Protect using XML API</title>
      <link>https://live.paloaltonetworks.com/t5/globalprotect-discussions/remove-remote-user-from-global-protect-using-xml-api/m-p/582381#M5207</link>
      <description>&lt;P&gt;Thanks for the great info and the help&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/77347"&gt;@TomYoung&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I opened a ticket with support and they had me do the following which works for Prisma Access.&amp;nbsp; I had to add the computer name in base64 and the domain.&amp;nbsp; Once I added these to the XML API along with the username in base64 this worked to disconnect the client from the VPN.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A href="https://x.x.x.x/api/?type=op&amp;amp;cmd=" target="_blank" rel="noopener"&gt;https://x.x.x.x/api/?type=op&amp;amp;cmd=&lt;/A&gt;&lt;SPAN&gt;&amp;lt;request&amp;gt;&amp;lt;plugins&amp;gt;&amp;lt;cloud_services&amp;gt;&amp;lt;gpcs&amp;gt;&amp;lt;logout_mobile_user&amp;gt;&amp;lt;gateway&amp;gt;&amp;lt;computer&amp;gt;computernameinbase64&amp;lt;/computer&amp;gt;&amp;lt;domain&amp;gt;&lt;/SPAN&gt;&lt;A href="https://domain.com/" target="_blank" rel="noopener"&gt;domain.com&lt;/A&gt;&lt;SPAN&gt;&amp;lt;/domain&amp;gt;&amp;lt;user&amp;gt;usernameinbase64&amp;lt;/user&amp;gt; &amp;lt;/gateway&amp;gt;&amp;lt;/logout_mobile_user&amp;gt;&amp;lt;/gpcs&amp;gt;&amp;lt;/cloud_services&amp;gt;&amp;lt;/plugins&amp;gt;&amp;lt;/request&amp;gt;&amp;amp;key=&amp;lt;your_key&amp;gt;'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Only problem I am having now is the client automatically reconnects without having to reauth due to the Global Protect auth cookie.&amp;nbsp; Next step is to find a way to remove the GP cookie before killing the VPN.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 14:48:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/globalprotect-discussions/remove-remote-user-from-global-protect-using-xml-api/m-p/582381#M5207</guid>
      <dc:creator>John_J</dc:creator>
      <dc:date>2024-04-02T14:48:19Z</dc:date>
    </item>
  </channel>
</rss>

