SAP Knowledge Base Article - Public

2996013 - Cross-origin resource sharing CORS for SuccessFactors OData API

Symptom

You are checking your browser console logs and you are seeing issues like:

Access to XMLHttpRequest at https://apixxxx.successfactors.com from origin http://localhost has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Environment

  • SAP SuccessFactors HXM HCM Suite
  • OData API

Resolution

Currently our OData service is not compatible with customer specific configuration to be maintained as our API calls are always server to server call.

For web browser based applications, API endpoint cannot be used for direct browser access and thus not allow cross origin access.

One general recommended solution would be to check this with your IT team/vendor to have one proxy which can translate your domain to successfactors or sapsf domain.

Keywords

CORS, OData, API, SuccessFactors HXM Suite, HCM, Cross-origin resource sharing, Access to XMLHttpRequest at https://apixxxx.successfactors.com from origin http://localhost has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status. , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , How To

Product

SAP SuccessFactors HCM suite all versions