cancel
Showing results for 
Search instead for 
Did you mean: 

SAP FSM get request to cloud-org-level-service-api blocked by CORS

0 Kudos
249

Hello everybody,

I'm trying fetching a get request from cloud-org-level-service-api in my FSM extension (hosted on GitHub pages) to get the organizational level based on unifiedPersonId, but i'm blocked by CORS policy:

"... 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. ... ".

If i make the get request in Postman i'm getting the correct response.

My request url is:

https://eu.coresuite.com/cloud-org-level-service/api/v1/levels/allocations?unifiedPersonId=aaaaaaaa-...

the header :
Authiration: 'Bearer ..... '
Accept: application/json
Content-Type: application/json
X-Account-ID: 12345 --- required
X-Company-ID: 123456 --- required
X-Client-ID: 'abc'
X-Client-Version: 1.0.0

Is there any way to make this get request work from a web browser or to edit CORS policies in FSM? I tried using mode: 'no-cors' in the fetch , but then i can't use the required headers.

Thanks.

Best Regards,
Filip.

Accepted Solutions (0)

Answers (0)