im struggling with authorization on SAP BTP when calling a self-build API from UI5 using BTP destinations. I have following destination:
The destination is linked to a API service I build in NodeJS and deployed to CF to send a crypted version of the logged in user. Checking the connection it already says 401, but this happened with every configuration I tried and my thought was forwardingAuthToken should do its part when called from a UI5 application for instance.
See the small extract from my Node service. Isolated this service works perfectly fine and delivers the expected result when asked (i spared out some logic lines, so dont worry about its functionality).
My problem comes from the UI5 application where I try to get information from this service.
sUrl is a build url from my application and gets routed though SAP managed by approuter to my destination (the routing itself works fine).
The UI5 app is a managed-by application - so i inserted into xs-app.json the necessary configurations.
The ajax call itself connects right to the service, but fails with the response HTML Error 401 - Unauthorized. How should i configure the Destination in SAP BTP right or what credentials do I have to use in my ajax call to get this scenario running.
Im really looking forward to your help.