<?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>Question Re: x-csrf-token validation failed in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/x-csrf-token-validation-failed/qaa-p/12576856#M4716190</link>
    <description>&lt;P&gt;Hi Akash,&lt;/P&gt;&lt;P&gt;Can you send header as &lt;STRONG&gt;Cookie &lt;/STRONG&gt;with token value and try.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
    <pubDate>Sun, 04 Sep 2022 15:26:36 GMT</pubDate>
    <dc:creator>AdityaMani51</dc:creator>
    <dc:date>2022-09-04T15:26:36Z</dc:date>
    <item>
      <title>x-csrf-token validation failed</title>
      <link>https://community.sap.com/t5/technology-q-a/x-csrf-token-validation-failed/qaq-p/12576855</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I am trying to post data in odata service in s4hana. I am able to do so from POSTMAN, however from SAP CPI i am getting token validation failed error.&lt;/P&gt;
  &lt;P&gt;I have checked the log and i could see x-csrf-token being passed in odata post call.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2090771-z-csrf-token-validation-failed.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Can someone please help me the reason of the error when token in already passed in post call.&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 04 Sep 2022 08:58:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/x-csrf-token-validation-failed/qaq-p/12576855</guid>
      <dc:creator>former_member786114</dc:creator>
      <dc:date>2022-09-04T08:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: x-csrf-token validation failed</title>
      <link>https://community.sap.com/t5/technology-q-a/x-csrf-token-validation-failed/qaa-p/12576856#M4716190</link>
      <description>&lt;P&gt;Hi Akash,&lt;/P&gt;&lt;P&gt;Can you send header as &lt;STRONG&gt;Cookie &lt;/STRONG&gt;with token value and try.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Sun, 04 Sep 2022 15:26:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/x-csrf-token-validation-failed/qaa-p/12576856#M4716190</guid>
      <dc:creator>AdityaMani51</dc:creator>
      <dc:date>2022-09-04T15:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: x-csrf-token validation failed</title>
      <link>https://community.sap.com/t5/technology-q-a/x-csrf-token-validation-failed/qaa-p/12576857#M4716191</link>
      <description>&lt;P&gt;Hi Aditya,&lt;/P&gt;&lt;P&gt;Tried setting Cookie with token value. However, same error.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2090887-token.png" /&gt;&lt;/P&gt;&lt;P&gt;Groovy script:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; def headers = message.getHeaders();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;    def x_csrf_token = headers.get("x-csrf-token")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;    message.setHeader("Cookie", x_csrf_token.toString());&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Akash&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 17:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/x-csrf-token-validation-failed/qaa-p/12576857#M4716191</guid>
      <dc:creator>former_member786114</dc:creator>
      <dc:date>2022-09-06T17:26:56Z</dc:date>
    </item>
  </channel>
</rss>

