on 2022 Feb 11 2:22 AM
Hi Experts,
I have developed a CAP NodeJS multi-tenant (based on SAP HANA Academy yeoman generator) app that require certain services from on-premise system. The app runs perfectly in multi-tenant mode when using destination service (via internet and uses basic authentication) to connect to external service. Now, I need to run the destination service with connectivity service. The on-prem system is added to the tenant subaccount's cloud connector, changed the destination service proxy type to 'on-premise', added connectivity service to mta.yaml file of app and linked it to the app-srv application(from which the external service is called). But unfortunately it raises an error as below:
'Error during request to remote service: Failed to load destination. Caused by: Failed to add proxy authorization header - client credentials grant failed! Caused by: Could not fetch client credentials token for service of type "connectivity". Caused by: Request failed with status code 401'

How can I solve this issue or am i missing something?
Many thanks,
Jerin Jacob
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Gregor, for the wonderful blog!
As the blog suggests, I had to add connectivity as a dependency to the 'srv' app. Also, I used a custom event handler for https://{consumer}-srv.${default-domain}/mtx/v1/provisioning/dependencies; and thus had to add connectivity's xsappname here :
service.on('dependencies', async (req) => {
return [{
'xsappname': services.dest.xsappname
},
{
'xsappname': services.conn.xsappname
}];
});
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.