<?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: Keep getting &amp;quot;PASWS006E: The session token is missing, invalid or expired&amp;quot; when trying to use API. in Privilege Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373284#M3949</link>
    <description>&lt;P&gt;I would be willing to, but how do I send you a message? I don't see an option under Messages nor do I see a send message button when I go to your profile. Understandably, I am unwilling to post that information here.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2023 13:43:24 GMT</pubDate>
    <dc:creator>nate_chiles</dc:creator>
    <dc:date>2023-02-13T13:43:24Z</dc:date>
    <item>
      <title>Keep getting "PASWS006E: The session token is missing, invalid or expired" when trying to use API.</title>
      <link>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373282#M3947</link>
      <description>&lt;P&gt;I made use of the CyberArk API for Privilege Cloud before it was integrated with CyberArk Identity. Now I keep getting "PASWS006E: The session token is missing, invalid or expired"&lt;/P&gt;&lt;P&gt;My code looks like:&lt;/P&gt;&lt;P&gt;$uri = https://&amp;lt;identity-tenant-id&amp;gt;.id.cyberark.cloud/oauth2/platformtoken&lt;/P&gt;&lt;P&gt;$headers = new-object "System.Collections.Generic.Dictionary[[String],[String]]"&lt;/P&gt;&lt;P&gt;$headers.add("Content_type", "x-www-form-urlencoded")&lt;/P&gt;&lt;P&gt;$body = 'grant_type=client_credentials&amp;amp;client_id=&amp;lt;client_id&amp;gt;&amp;amp;client_secret=&amp;lt;client_secret&amp;gt;'&lt;/P&gt;&lt;P&gt;$capture = Invoke-RestMethod -Uri $uri -Method 'POST' -Headers $headers -Body $body&lt;/P&gt;&lt;P&gt;$token = $capture.access_token&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$uri = 'https://&amp;lt;subdomain&amp;gt;.privilegecloud.cyberark.cloud/PasswordVault/&amp;lt;API&amp;gt;'&lt;/P&gt;&lt;P&gt;$headers = new-object "System.Collections.Generic.Dictionary[[String],[String]]"&lt;/P&gt;&lt;P&gt;$headers.add("Authorization", $token) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;$headers.add("content-type", "application/json") &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/P&gt;&lt;P&gt;$body = &amp;lt;body&amp;gt;&lt;/P&gt;&lt;P&gt;$capture = Invoke-WebRequest -Uri $uri -Method 'POST' -Headers $headers -Body $body&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have repeatedly confirmed that the first block succeeds and $token will get assigned a long string of various characters. The user being authenticated in the first block exists in CyberArk Identity, has the "Is Service user" and "Is OAuth confidential client" boxes checked. The user has the Privilege Cloud User Role and another Role which has access to a Safe. I have tried using Postman. Again, I can get a token value, and I set that as the value for an Authorization header. The result is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other thing I want to call out, is there is a step "Assign the newly created Service user(s) to the your service role that enables them to send requests to your service APIs". I am not sure what Role this is referencing. I did not see an API role nor any API options when creating a new role.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reference material: https://docs.cyberark.com/Product-Doc/OnlineHelp/PrivCloud-SS/Latest/en/Content/ISPSS/ISPSS-API-Authentication.htm&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 22:16:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373282#M3947</guid>
      <dc:creator>nate_chiles</dc:creator>
      <dc:date>2023-02-08T22:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Keep getting "PASWS006E: The session token is missing, invalid or expired" when trying to use API.</title>
      <link>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373283#M3948</link>
      <description>&lt;P&gt;This honestly looks good to me after a quick review. I believe the 'role assignment' you saw in the Docs is referring to the Privilege Cloud roles as you've already configured them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you're getting the token from Identity I'm mostly curious if the Privilege Cloud API syntax is correct. Of course the error you are receiving is telling me it is at least 'mostly' correct, otherwise we would be seeing bad requests. Are you able to message me the full API path and/or body of that request for a quick review?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 19:21:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373283#M3948</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2023-02-09T19:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Keep getting "PASWS006E: The session token is missing, invalid or expired" when trying to use API.</title>
      <link>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373284#M3949</link>
      <description>&lt;P&gt;I would be willing to, but how do I send you a message? I don't see an option under Messages nor do I see a send message button when I go to your profile. Understandably, I am unwilling to post that information here.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 13:43:24 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373284#M3949</guid>
      <dc:creator>nate_chiles</dc:creator>
      <dc:date>2023-02-13T13:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Keep getting "PASWS006E: The session token is missing, invalid or expired" when trying to use API.</title>
      <link>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373285#M3950</link>
      <description>&lt;P&gt;Hi Nate, if you haven't already done so, I would encourage&amp;nbsp;you to open a new case with our Support Team. After reviewing other support cases in which the same error message was encountered, I see that there are many factors that come into play and our Support Engineers would be happy to lend a hand with the linear troubleshooting process you've begun.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Sal&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 16:22:07 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373285#M3950</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2023-02-16T16:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Keep getting "PASWS006E: The session token is missing, invalid or expired" when trying to use API.</title>
      <link>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373286#M3951</link>
      <description>&lt;P&gt;Can you share anything about how you resolved this? I am having the same issue.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 19:42:41 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/privilege-cloud-discussions/keep-getting-quot-pasws006e-the-session-token-is-missing-invalid/m-p/1373286#M3951</guid>
      <dc:creator>DReynolds_zIAO</dc:creator>
      <dc:date>2023-02-20T19:42:41Z</dc:date>
    </item>
  </channel>
</rss>

