<?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 having an issue passing the auth token to subsequent API endpoints in Endpoint Privilege Manager (EPM) Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/having-an-issue-passing-the-auth-token-to-subsequent-api/m-p/1337418#M2244</link>
    <description>&lt;P&gt;$contenttype = "application/json"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$response = Invoke-RestMethod -Uri $cepmURL -Credential $credential -Method POST -ContentType $contenttype -Body ($body | ConvertTo-Json)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$setsurl = "&lt;A alt="https://cepm.oii.oceaneering.com/EPM/API/11.5.2/Sets" href="https://cepm.oii.oceaneering.com/EPM/API/11.5.2/Sets" target="_blank"&gt;https://&amp;lt;Server&amp;gt;/EPM/API/11.5.2/Sets&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$header = @{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Authorization = "basic+" + $response.EPMAuthenticationResult&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$sets_response = Invoke-RestMethod -Uri $setsurl -Method Get -Headers ($header | ConvertTo-Json)&amp;nbsp;-ContentType $contenttype&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;generates this:&lt;/P&gt;&lt;P&gt;Invoke-RestMethod : Cannot bind parameter 'Headers'. Cannot convert the "{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;"Authorization":&amp;nbsp;"basic+token"&lt;/P&gt;&lt;P&gt;}" value of type "System.String" to type "System.Collections.IDictionary".&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jan 2022 20:14:25 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2022-01-07T20:14:25Z</dc:date>
    <item>
      <title>having an issue passing the auth token to subsequent API endpoints</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/having-an-issue-passing-the-auth-token-to-subsequent-api/m-p/1337418#M2244</link>
      <description>&lt;P&gt;$contenttype = "application/json"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$response = Invoke-RestMethod -Uri $cepmURL -Credential $credential -Method POST -ContentType $contenttype -Body ($body | ConvertTo-Json)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$setsurl = "&lt;A alt="https://cepm.oii.oceaneering.com/EPM/API/11.5.2/Sets" href="https://cepm.oii.oceaneering.com/EPM/API/11.5.2/Sets" target="_blank"&gt;https://&amp;lt;Server&amp;gt;/EPM/API/11.5.2/Sets&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$header = @{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Authorization = "basic+" + $response.EPMAuthenticationResult&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$sets_response = Invoke-RestMethod -Uri $setsurl -Method Get -Headers ($header | ConvertTo-Json)&amp;nbsp;-ContentType $contenttype&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;generates this:&lt;/P&gt;&lt;P&gt;Invoke-RestMethod : Cannot bind parameter 'Headers'. Cannot convert the "{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;"Authorization":&amp;nbsp;"basic+token"&lt;/P&gt;&lt;P&gt;}" value of type "System.String" to type "System.Collections.IDictionary".&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 20:14:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/having-an-issue-passing-the-auth-token-to-subsequent-api/m-p/1337418#M2244</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2022-01-07T20:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: having an issue passing the auth token to subsequent API endpoints</title>
      <link>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/having-an-issue-passing-the-auth-token-to-subsequent-api/m-p/1337419#M2245</link>
      <description>&lt;P&gt;The header is being converted into JSON and cast into a string when it should be a hashtable.&lt;/P&gt;&lt;CODE&gt;-Headers ($header | ConvertTo-Json)&lt;/CODE&gt;&lt;P&gt;try&lt;/P&gt;&lt;CODE&gt;Invoke-RestMethod -Uri $setsurl -Method Get -Headers $header -ContentType $contenttype&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 21:39:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/endpoint-privilege-manager-epm/having-an-issue-passing-the-auth-token-to-subsequent-api/m-p/1337419#M2245</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2022-01-10T21:39:04Z</dc:date>
    </item>
  </channel>
</rss>

