SAP Knowledge Base Article - Public

3387282 - Can't get CSRF Token for the SAP Analytics Cloud REST API from "<tenant-url>/api/v1/csrf" endpoint for Data Export API.

Symptom

When launching a GET request to following endpoint "<tenant-url>/api/v1/csrf" the below error occurs:

<html><head><link rel="shortcut icon" href="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /><script>document.cookie="fragmentAfterLogin="+encodeURIComponent(location.hash)+";path=/;Secure;SameSite=None;";document.cookie="locationAfterLogin="+encodeURIComponent(location.href.split('#')[0].split(location.host)[1])+";path=/;Secure;SameSite=None;";document.cookie="signature=***;path=/;Secure;SameSite=None;";location="XXX"</script></head></html>

Environment

SAP Analytics Cloud

Reproducing the Issue

Setup the Data Export API as per steps in the help portal guide:

https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/14cac91febef464dbb1efce20e3f1613/db62fd76514b48f8b71d695360320f4a.html

Cause

Custom authentication is not enabled.

Resolution

Add below parameter to header of the request: 

x-sap-sac-custom-auth: true

Keywords

SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud, SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics, postman, SCIM, Data Export API, OAUTH. , KBA , LOD-ANA-ADM , SAC Administration , Problem

Product

SAP Analytics Cloud 1.0