# SAP OData authentication

> To create a connection, you need the following credentials:

## Prerequisites

To create a connection, you need the following credentials:

* Site URL - The URL of the SAP product you would want to connect with.
* Service - The SAP service you want to connect to, such as `API_BUSINESS_PARTNER`. For SAP C4C, keep the default value of `NA`.
* Username - Instance username.
* Password - Instance account password.

:::note
If you're connecting to SAP S4 HANA, make sure the service you want to access is enabled. For activating and maintaining
any service, refer to the [Activate OData Services V2](https://help.sap.com/docs/SAP\_Group\_Reporting\_Data\_Collection/e29950571a2b4065b1dacaf881c67413/92bce22bebe146db826a22e64f7b7acd.html) documentation.
:::

## Retrieve the Site URL

### If you're connecting to SAP S4 HANA

The SAP OData connector supports only SAP S4 HANA Cloud Private Edition. This means that the HTTPS API requests need both
the host (a domain or IP address) and the port number (an identified process or service running on a host) to be publicly
accessible.

To do this, you must expose your [Host]:[PORT] combination on a public network. You can achieve this using a tool such as
ngrok, that creates secure tunnels from a public endpoint to the service running on your local machine.

Format example for the site URL using ngrok: `https://<placeholder>.ngrok.app`, where `<placeholder>` is a randomly generated string that identifies your ngrok session. This URL makes your locally running service (specified
by the host and port) accessible over the internet.

### If you're connecting to SAP C4C

To retrieve the site URL, navigate to your SAP Sales Cloud site URL. For example, `https://my328080.crm.ondemand.com`.

## Add the SAP OData connection

1. Select Orchestrator from the product launcher.
2. Select a folder, and then navigate to the **Connections** tab.
3. Select **Add connection**.
4. To open the connection creation page, select the connector from the list. You can use the search bar to find the connector.
5. First, select the SAP product you want to connect to: SAP C4C or SAP S4 HANA.
6. Next, enter the required credentials. If you're connecting to SAP C4C, keep the **Service** field's default value (`NA`).

   For any secret-type field, you can select the menu next to the field and choose **Use credential asset** to reference an Orchestrator credential asset linked to an external vault instead of entering the value directly. For more information, see [Use credential assets for connections](credential-store-connections.md).
7. Select **Connect** to create the connection.
