SAP Knowledge Base Article - Public

2748971 - Error: "Access to XMLHttpRequest at <URL> from origin <tenant> has been blocked by CORS policy...", when connecting SAP Analytics Cloud (SAC) to BW

Symptom

  • After configuring CORS within BW the following error is thrown:

"Access to XMLHttpRequest at 'https://.../sap/bw/ina/GetServerInfo?sap-client=045'
from origin '<tenant URL>' has been blocked by CORS policy: Response to preflight
request doesn't pass access control check: No 'Access-Control-Allow-Origin' header
is present on the requested resource."

2748971.png

Environment

  • SAP Analytics Cloud
  • SAP NetWeaver

Reproducing the Issue

  1. Enable CORS on SAP NetWeaver as per the SAP Analytics Cloud Help; Enable CORS on SAP NetWeaver releases lower than 7.52
  2. Attempt to connect SAP Analytics Cloud to a BW system.

Cause

  • For SAP NetWeaver releases lower than 7.52, the CORS_LIVE_REWRITE file was not configured as per the steps outlined in SAP Analytics Cloud Help
  • For SAP NetWeaver releases above 7.52, the Native CORS Configuration on UNCONCOCKPIT transaction has not been configured correctly

Resolution

For SAP NetWeaver 7.52 and below;

  • Ensure that the ICM Script steps in the SAP Help Library or Guided Playlists are followed correctly.
  • In this instance, the HostName in the following line was blank:

if %{HEADER:ORIGIN} regimatch ^(https:\/\/)?<HOSTNAME> [AND]

  • HOSTNAME must be replaced with the correct SAP Analytics Cloud host. For example: mytenant.us1.sapanalytics.cloud

For SAP NetWeaver 7.53 and above;

Ensure that the Native CORS steps have been followed in the SAP Help Library or Guided Playlist;

  • Make sure the Service Path and Host Rule have been configured correctly eg. 
    • Service Path: Add /sap/bw/ina/
    • Host rule: Add your SAP Analytics Cloud host. For example: mytenant.us1.sapanalytics.cloud

SameSite Cookie Configuration

As of Google Chrome release 80, and Microsoft Edge V86 and above, changes were made to the SameSite Cookie policy which may require an additional configuration for your BW system to use these cookie headers. Please follow the KBA below;

2890576 - After Google Chrome / Microsoft Edge browser updates, Live Data Connections are no longer working in SAP Analytics Cloud (SAC) & SAP Digital Boardroom

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

SAP, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics, cross, origin, script, host, name, live rewrite, edit, bex, business, warehouse , KBA , LOD-ANA , SAP Analytics Cloud (SAC) , LOD-ANA-BI , Business Intelligence Functionality, Analytic Models , LOD-ANA-PL , Planning , LOD-ANA-BR , SAC Boardroom , LOD-ANA-PR , SAC Predictive , Problem

Product

SAP Analytics Cloud 1.0