Skip to Content

CSRF Error in SAPUI5 Local Development using VS Code and UI5 2.0 Tooling

Dear Experts,

I am a beginner trying to learn SAPUI5 by using new SAPUI5 local development UI5 Tooling.

I created a new app using Yeoman template generator and configured ES5 Gateway demo system for the OData service. I used ui5-middleware-simpleproxy to be able to connect to ES5 from the app. I am able to connect to the system while executing the app but I am getting below CSRF error from ES5 as the first batch OData call is failing.

I also checked if it is getting the CSRF token before the batch call and CSRF token exists during the batch call.

This same application when I build in Web IDE, it is working but not locally.

Please help me know the issue.

Really appreciate your support.

Regards,

Deepak Dora

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 08 at 01:44 AM

    the error states 403 forbidden. hence you do not have authorization when you are accessing the ES5 system locally. when you are trying through webide then the destination in the cloud platform is routing your call and that destination would have the right connection credentials which you are lacking when you making this call locally.

    Add a comment
    10|10000 characters needed characters exceeded

    • Dear Prabuddha,

      Thank you for this quick response. I am using the same credential while calling the ES5 system both in local and web IDE.

      I even can get the service metadata directly in the browser with my User ID and Password. I have the authorization to ES5.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.