Establishing a Connection
Creating a JDBC Data Source
You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for SAP SuccessFactors consists of three basic steps:
- Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
- Provide the driver class. For example:
cdata.jdbc.sapsuccessfactors.SAPSuccessFactorsDriver
- Provide the JDBC URL. For example:
jdbc:sapsuccessfactors:User=username;Password=password;CompanyId=CompanyId;Url=https://api4.successfactors.com or jdbc:cdata:sapsuccessfactors:User=username;Password=password;CompanyId=CompanyId;Url=https://api4.successfactors.com
The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:sapsuccessfactors:" or "jdbc:cdata:sapsuccessfactors:" and can include any of the connection properties in name-value pairs separated with semicolons.
The CData JDBC Driver for SAP SuccessFactors communicates to SAP SuccessFactors over the OData API. By default, it is enabled. However, if you need to provide additional permissions, please follow the steps from SAP laid out in their support here.
Connecting to SAPSuccessFactors
You can authenticate to SAP SuccessFactors using Basic authentication or OAuth with SAML assertion.
Basic
You must provide values for the following properties to successfully authenticate to SAP SuccessFactors. Note that the provider will reuse the session opened by SAP SuccessFactors using cookies. Which means that your credentials will be used only on the first request to open the session. After that, cookies returned from SAP SuccessFactors will be used for authentication.- AuthScheme, set this to BASIC.
- Url, set this to the url of the server hosting Success Factors. Some of the servers are listed here.
- User, set this to the username of your account.
- Password, set this to the password of your account.
- CompanyId, set this to the unique identifier of your company.
Once OData is enabled, you must grant access to the API to activate Basic Auth for a given user.
Granting Permission for an RBP System
- Assign the permission in Administrator Permissions > Manage Integration Tools > Allow Admin to Access OData API through Basic Authentication.
Granting Permission for a User-based System
- Click Administrative Privileges > Integration Tools, and select Allow Admin to Access OData API through Basic Authentication.
- On the Managing Administrative Privilege page, select the Employee Export and Employee Import checkboxes to grant those permissions to the given user.
OAuth
See Using OAuth Authentication for an authentication guide for OAuth2.