This page contains instructions for setting up the OAuth 2.0 server in SAP and setting up the OAuth 2.0 client in Foundry.
SYSTEM
user/PALANTIR/OAUTH_CLIENT
should be assigned to the Foundry technical user and any end users wishing to write back to SAP from Foundry/PALANTIR/CONTENT_FUNCTION_ALL
should be assigned to end user/sap/public/bc
node to be activated (for OAuth 2.0 configuration)
/sap/bc/sec/oauth2*
/default_host/sap/bc/webdynpro/sap/oauth2_authority
SOAUTH2
transaction.https://<FOUNDRY_DOMAIN>/workspace/oauth2-clients/callback
./PALANTIR/SRV_0001
and a description such as Palantir Foundry writeback using SAP functions
.~CHECK_CSRF_TOKEN
and value 0
(zero)./IWFND/MAINT_SERVICE
transaction./PALANTIR/SRV_0001
LOCAL
/PALANTIR/SRV
ODATA_SRV
1
This follows the general approach outlined in Configure outbound applications but has been tailored specifically to SAP systems.
Ensure that the SAP source URL is using HTTPS, or webhooks will fail when using an OAuth flow.
On the overview page of the new REST API source, select Create webhook.
Give the webhook a name (such as “SAP OAuth2 authorization code flow webhook”).
Advance to the Request configuration step.
Under Calls, select POST as the request type and enter sap/bc/sec/oauth2/token
as the path.
Under Query Params, sap-client
might have to be set if the client used is not the default client.
redirect_uri
client_id
authorization_code
grant_type
→ authorization_code
redirect_uri
→ Mapped to the redirect_uri
input parameter (see below for how to do this)client_id
→ Mapped to the client_id
input parametercode
→ Mapped to the authorization_code
input parameteraccess_token
token_type
expires_in
refresh_token
scope
This is an example for creating access_token
. All output parameters should follow this pattern.
sap/bc/sec/oauth2/token
) should be used.sap-client
as a Query Param if needed.Content-Type
→ application/x-www-form-urlencoded
client_id
refresh_token
grant_type
→ refresh_token
client_id
→ Mapped to the client_id
input parameterrefresh_token
→ Mapped to the refresh_token
input parameter
access_token
token_type
expires_in
refresh_token
scope
https://<SAP_DOMAIN>/sap/bc/sec/oauth2/authorize
/PALANTIR/SRV_0001
.