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.


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([1])+";path=/;Secure;SameSite=None;";document.cookie="signature=***;path=/;Secure;SameSite=None;";location="XXX"</script></head></html>


SAP Analytics Cloud

Reproducing the Issue

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


Custom authentication is not enabled.


Add below parameter to header of the request: 

x-sap-sac-custom-auth: true


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


SAP Analytics Cloud 1.0