on 2022 Dec 05 6:20 PM
Dear Team,
I'm trying to consume the SAP Graph HCM solution in my SAP CAP extension application.
To achieve the same, I have create the destination for SAP Graph (OAuth2JWTBearer) using Graph service client Id and Client secret details.
But, When I'm consuming the same in my SAP CAP Node.js using external API Consume approach, I'm getting "No Database connection" Issue.
BTP Subaccount Destination
Package.json Configuration:
Custom handler.js file:
ranjith13119-gmail.com was able to solve the issue by doing the following things:
1. The error "No database connection" was happening because the custom handler was not invoked for the Graph entities and due to the missing "@cds.persistence.skip" annotation on the entities the CAP framework assumed it needs to query the database to fetch results.
2. The destination was changed to use "No authentication". Instead, the JWT for accessing the Graph API is forwarded to the destination in the "Authorization"-header as a bearer token.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help.
User | Count |
---|---|
71 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.