cancel
Showing results for 
Search instead for 
Did you mean: 

Problem -Unable to call protected app from another App.

somnathsap
Explorer
0 Kudos
370

Hi Expert,
I have created two CAP applications, each with its own XSUAA authentication service. I want to call one CAP service from another CAP application. I followed @CarlosRoggan  blog here, which worked perfectly for external users but failed for the application-to-application case.

I followed the exact steps, but the user JWT token doesn't contain the provider app scope when doing it for another application. However, it works perfectly for external users. Please help me.
@CarlosRoggan @gregorw @MioYasutake @Ivan-Mirisola 

Thanks
Somnath

VVancalbergh
Contributor
0 Kudos

Juast want to mention that the "Cloud Applications Studio" tag is incorrect, since this question has no relation to SAP Business ByDesign or SAP C4C.

Accepted Solutions (1)

Accepted Solutions (1)

MioYasutake
Active Contributor
0 Kudos

@somnathsap 

The blog post you mentioned explains the very basic steps to achieve app to app authentication. In CAP, we normally utilize the destination service to achieve the same. How to do it is described in the document below:

https://cap.cloud.sap/docs/guides/using-services#introduction

MioYasutake
Active Contributor
0 Kudos

P.S. The original solution works fine with a slight modification on the server.js file of the provider app. Please find my git repo below:

https://github.com/miyasuta/app-to-app-authentication

Answers (0)