[{ALLOW view All}]
[{ALLOW edit Markus}]

!Connecting SAP SuccessFactors Using an OAuth 2.0 Client (OA2CS)

Follow \\
SIMG > ABAP Platform > Application Server > Basis Services > Communication Interfaces \\
> OAuth 2.0 Client Implementation for SAP SuccessFactors Integration

The default implementation allows only a connection to ONE SuccessFactors instance.\\
Then you can use the existing objects.

This ones decribes how to create custom objects for multiple instances.

!certificates / communication
1. Configure Proxy Settings\\
x.SICF > F8 > Menu > Client > Proxy Settings \\
*   > HTTPS Protocol = sia-proxy-basic.geo.conti.de:3128 SKIPPED !!!\\
*   > Global Settings > Set Active SKIPPED !!!
   

!OAuth configuration
* OAuth profile, default "SUCCESSFACTORS", use SE80 > Create > Others > OAuth 2.0 Client Profile (t.OA2C_PROFILES)
* Application ID, default "DEFAULT", x.CLB2_APPLI
* Provider type, default "SuccessFactors", x.CLB2_PTYPE (SM30 > CLB2V_PTYPE)
* Application Server Assignment, default "DEFAULT", SM34 > CLB2VC_APPLI_PLATF  <= here we have the OAuth App ID and the companyId
* Server Communication, default "SuccessFactors", SM34 > CLB2VC_PLATF (SM30 > CLB2V_PLATF), make sure to fill also the "Authentication Methods" like USER
* Server, default "SuccessFactors", SM34 > CLB2VC_PLATF_DEF 
* Application Settings" for each instance with SM30 > CLB2V_APPL_DATA
* Parameters for each instance with SM30 > CLB2V_APPL_EXT, here we have company_id	

x. OA2C_CONFIG (t.oa2c_client)
{{{
api12preview.sapsf.eu/oauth/token
form, header, current, SAML
www.successfactors.com
998}}}



Example configuration, do use always same case to avoid mixing up
|Profile|Z_CONTIDEV
|Type|Z_CONTIDEV
|Application ID|Z_CONTIDEV
|Service Provider Type|Z_CONTIDEV > SSF ID = OACD
|Server|Z_CONTIDEV

! Connection Test
r.RCLB2_DEMO_GENERIC
* Choose your Service Provider Type and Application ID
* Request Method: HTTP Get (GET)
* Manually Entered Endpoint
** Endpoint: /odata/v2/FODivision/
** Authentication Context: User Context (USER)

! Successfactors auth endpoints

The first is not secure anymore and should not be used anymore.
{{{
/oauth/idp
	parameters: 
		client_id
		user_id
		private_key
		token_url
		use_email
		use_username  <=== true
/oauth/token
	parameters:
		company_id
		client_id
		grant_type
		assertion
		new_token	<=== true
}}}
	
!Trace
/usr/sap/DMD/D11/work/dev_w*  (work process traces) => search for "OA2C"