<?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: How to disable token using REST API? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-disable-token-using-REST-API/m-p/673122#M18235</link>
    <description>&lt;P&gt;Actually, the POST is only one problem, I have already gone through.&lt;/P&gt;&lt;P&gt;Thanks to your post has found syntax error - "/token/" instead of "/tokens/"&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 12:11:17 GMT</pubDate>
    <dc:creator>ropo</dc:creator>
    <dc:date>2024-01-03T12:11:17Z</dc:date>
    <item>
      <title>How to disable token using REST API?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-disable-token-using-REST-API/m-p/673107#M18229</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I do success to disable/enable tokens using the WEB interface.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But curl command fails while trying to disable token using REST API.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ropo_0-1704270183905.png" style="width: 678px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28737i9D99456E19FF2CAC/image-dimensions/678x61?v=v2" width="678" height="61" role="button" title="ropo_0-1704270183905.png" alt="ropo_0-1704270183905.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Executing GET method works OK:&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif" color="#0000FF"&gt;curl -k -u USER1:USER_PASW -X GET &lt;A href="https://localhost:8089/services/authorization/tokens" target="_blank" rel="noopener"&gt;https://localhost:8089/services/authorization/tokens&lt;/A&gt; -d id=80e7402b9940a7ac761f259d1e3e49bad1417394924ad0909c8edfd8eb92800e&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;But PUT is failed with no clear error message:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif" color="#0000FF"&gt;curl -k -u USER1:USER_PASW&amp;nbsp; -X PUT &lt;A href="https://localhost:8089/services/authorization/token/ron" target="_blank" rel="noopener"&gt;https://localhost:8089/services/authorization/token/ron&lt;/A&gt; -d id=80e7402b9940a7ac761f259d1e3e49bad1417394924ad0909c8edfd8eb92800e -d status=disabled&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The result is:&lt;/P&gt;&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif" color="#0000FF"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif" color="#0000FF"&gt;&amp;lt;response&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif" color="#0000FF"&gt;&amp;lt;messages&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif" color="#0000FF"&gt;&amp;lt;msg type="ERROR"&amp;gt;Not Found&amp;lt;/msg&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif" color="#0000FF"&gt;&amp;lt;/messages&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="comic sans ms,sans-serif" color="#0000FF"&gt;&amp;lt;/response&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I tried to switch username between ron and david.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;What's wrong and how to locate more informative problem&amp;nbsp;description.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thanks in advance,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;David&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 08:35:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-disable-token-using-REST-API/m-p/673107#M18229</guid>
      <dc:creator>ropo</dc:creator>
      <dc:date>2024-01-03T08:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable token using REST API?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-disable-token-using-REST-API/m-p/673115#M18232</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/263705"&gt;@ropo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I guess just the method that you've provided seems to be inappropriate. You'll need to use the POST method to disable the authentication token.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -u &amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -X POST https://&amp;lt;server&amp;gt;:&amp;lt;management_port&amp;gt;/services/authorization/tokens/&amp;lt;token_user&amp;gt; -d id=&amp;lt;token_id&amp;gt; -d status=disabled&lt;/LI-CODE&gt;&lt;P&gt;Reference Doc -&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.2/Security/ManageAuthTokens#Disable_an_existing.2C_enabled_token" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.1.2/Security/ManageAuthTokens#Disable_an_existing.2C_enabled_token&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;BR /&gt;If the above solution helps, an upvote is appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 10:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-disable-token-using-REST-API/m-p/673115#M18232</guid>
      <dc:creator>tej57</dc:creator>
      <dc:date>2024-01-03T10:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable token using REST API?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-disable-token-using-REST-API/m-p/673122#M18235</link>
      <description>&lt;P&gt;Actually, the POST is only one problem, I have already gone through.&lt;/P&gt;&lt;P&gt;Thanks to your post has found syntax error - "/token/" instead of "/tokens/"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 12:11:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-disable-token-using-REST-API/m-p/673122#M18235</guid>
      <dc:creator>ropo</dc:creator>
      <dc:date>2024-01-03T12:11:17Z</dc:date>
    </item>
  </channel>
</rss>

