Establishing a Connection
The objects available within our connector are accessible from the "cdata.saphybrisc4c" module. To use the module's objects directly:
- Import the module as follows:
import cdata.saphybrisc4c as mod
- To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
mod.connect("User=user;Password=password;")
Connecting to SAP Cloud for Customer
To identify your SAP Cloud for Customer instance, set the following:- Tenant: The full domain name of your SAP Cloud for Customer tenant.
- Url: The URL corresponding to your SAP Cloud for Customer instance. You must specify this if it differs from the default service of "c4codata". Otherwise, omit this connection property.
Authenticating to SAP Cloud for Customer
User Credentials
Set the AuthScheme to Basic and specify the following:
- User: Your SAP Cloud for Customer username.
- Password: Your SAP Cloud for Customer password.
Azure AD
Set the AuthScheme to AzureAD.
Configuring a Custom Extension
This configuration requires a custom extension to SAP Hybris. This extension can be created using the yempty tool.
Connection Configuration
After configuring your custom extension, set the following to authenticate:
- InitiateOAuth: GETANDREFRESH.
- OAuthClientId: The application Id of the connector application, found in the Overview section of the app registration.
- OAuthClientSecret: The client secret value of the connector application. Azure AD displays this when you create a new client secret.
- CallbackURL: The redirect URI of the connector application. For example: https://localhost:33333
- SSOProperties: Set the following additional properties, each separated by a commma, in the format A=B;C=D; etc.
- Resource: The URL of your environment.
- AzureTentant: The Id of the Azure AD tenant where the applications are registered.