cancel
Showing results for 
Search instead for 
Did you mean: 

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

divyeaggarwal
Explorer
1,758

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

harianantha
Participant
0 Kudos

Hi divyeaggarwal ,

From where should I get Client ID, Client Sec, Token SRV URL, Token SRV User and Password?

And Does it work right away when you remove HTML5.ForwardAuthToken from the Additional Properties of the destination? OR Any other settings you did?

Really appreciate your help!!
Thank you!!

View Entire Topic

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 Kudos

Hi Dinu,

Thank you so much. It Works.

Regards

Divye

Steyn
Newcomer
0 Kudos

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