cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to access XSUAA enabled CAP Service destination in standalone SAP UI5 Application

divyeaggarwal
Explorer
4,402

Hello Everyone,

I have created the CAP Service enabled with XSUAA because of which if I try to execute my BTP Deployed CAP Service resulting me Unauthorized error which is expected behavior.

With Postman, I am able to do GET and POST call using oAuth credentials.

Now my requirement is to access this CAP Service in other SAP UI5 application outside CAP project.

I have created the destination in SAP BTP using XSUAA client credentials and authentication method as "OAuth2ClientCredentials" .

Below is the screen shot of destination

Now if I am trying to consume this destination in sap UI5 application its giving me 500 error.

Please let me know if I am missing some step.

Regards

Divye

Accepted Solutions (1)

Accepted Solutions (1)

You should remove HTML5.ForwardAuthToken from the Additional Properties of the destination. It does not make sense when using authenticating with OAuth2ClientCredentials.

divyeaggarwal
Explorer
0 Likes

Hi Dinu,

Thank you so much. It Works.

Regards

Divye

Steyn
Newcomer
0 Likes

not working for me, can you pls upload your destination along with xs-app routes

Answers (6)

Answers (6)

sparksaiteja
Discoverer
0 Likes

Even i'm working i getting same how i could we slove it

divyeaggarwal
Explorer
0 Likes

I have tried this and this also giving same 500 error

sparksaiteja
Discoverer
0 Likes

Is it completed broh

0 Likes

There are some limitations in connectivity support for oData sources supported by Fiori Tools. Please refer to the documentation of the relevant tool: Fiori Elements or SAP UI5 Freestyle.

You might be better off using Connect to an OData Service with a Customized URL. That way you can use the proxy available in Business Application Studio to connect to external systems.

divyeaggarwal
Explorer
0 Likes

I have tried this and this also giving same 500 error

divyeaggarwal
Explorer
0 Likes

Hi @karthikarjun,

Yes with postman it is working fine using oauth credentials.

Regards

Divye

karthikarjun
Active Contributor
0 Likes

Hi divyeaggarwal - It seems the issue has related to a system error.

  • 401 - Unauthorized
  • 500 - Internal server error

Did you get a chance to execute this API entity from postman client?

Regards,

Karthik Arjun

SAP Fiori | CPI Senior Specialist

pieterjanssens
Active Participant
0 Likes

It's a status code 500, meaning the server failed to respond or raised an error/exception due to his fault (could be a crash). Check the CAP app's service logs.