Repository navigation
Configuring Access to S4HANA Cloud with Basic Auth
This guide explains how to connect sap-dev and sap-bridge to an SAP S/4HANA Cloud system (e.g. S/4HANA Cloud Public Edition or sandbox environments) using Basic Authentication with a dedicated Technical Communication User.
In SAP S/4HANA Cloud, authentication differs fundamentally from traditional on-premise systems:
- No Basic Auth for Dialog Users: Human dialog users log in via SAP Cloud Identity Services (SAML 2.0 / OpenID Connect). Sending basic auth credentials for a dialog account causes the cloud gateway to return an HTML SAML SSO login redirect rather than authenticating the API call.
- Technical Communication Users: Programmatic HTTPS access (OData, REST) requires creating a dedicated technical Communication User and assigning it to one or more Communication Arrangements.
-
API Hostname (
-api): Cloud systems separate end-user UI traffic from API traffic. Always connect to the API gateway host (e.g.myXXXXXX-api.s4hana.cloud.sap), not the Fiori Launchpad user interface hostname. -
Non-ABAP Mode: Unless your tenant is a 3-System Landscape (3SL) Development Tenant with Developer Extensibility (
SAP_COM_0510), S/4HANA Cloud instances operate in pure OData/API mode without classic ADT workbench or SAP GUI access.
- Log into your S/4HANA Cloud Fiori Launchpad.
- Open the app Maintain Communication Users (App ID
F2268). - Click New.
- Enter:
-
User Name: e.g.,
TECH_SAPDEVorCC_SAPDEV -
Description:
Technical User for sap-bridge OData Integration - Password: Set a strong password (or use Propose Password). Save this password securely.
-
User Name: e.g.,
- Click Create.
- Open the app Communication Systems (App ID
F1762). - Click New.
- Enter:
-
System ID: e.g.,
SAP_BRIDGE_SYS -
System Name:
SAP Bridge Integration System
-
System ID: e.g.,
- Click Create.
- In General Data:
- Set Host Name to your company domain or an external FQDN (e.g.
yourcompany.comorbridge.sapdev.local).
(Do not uselocalhostor loopback IPs; communication scenarios with outbound notification capabilities rejectlocalhostas an invalid outbound target).
- Set Host Name to your company domain or an external FQDN (e.g.
- Scroll down to Users for Inbound Communication:
- Click + (Add).
-
Authentication Method: Select
User Name and Password. -
User Name: Select the user created in Step 1 (
TECH_SAPDEV).
- Click Save.
- Open the app Communication Arrangements (App ID
F1763). - Click New.
-
Scenario: Select the business scenario you wish to access, for example:
-
SAP_COM_0109for Sales Orders (API_SALES_ORDER_SRV) -
SAP_COM_0008for Business Partner / Customer / Vendor (API_BUSINESS_PARTNER) -
SAP_COM_0002for Financials / Journal Entries (API_JOURNALENTRYITEMBASIC_SRV) - Or any custom scenario (
YY1_...) created from Custom CDS Views.
-
- Click Create.
- Select your Communication System (
SAP_BRIDGE_SYS).- The Inbound Communication User will populate automatically.
- Check Inbound Services to confirm the service URL path and verify that the hostname contains
-api. - Click Save.
(Repeat Step 3 for any additional communication arrangements you want to access under the same technical user).
-
Open your
sap-bridgeWeb Dashboard (http://127.0.0.1:58454/?workspace_id=...). -
Click Add System (or edit your existing system card):
-
Host:
myXXXXXX-api.s4hana.cloud.sap(make sure to include-api) -
Port:
443 -
Scheme:
https -
Auth Type:
Basic Auth -
Username: The technical Communication User ID (
TECH_SAPDEV) - Password: The Communication User password
-
Client: Configure the assigned tenant SAP client (e.g.
100). Both SAP S/4HANA Cloud and SAP BTP ABAP Environment have assigned clients (typically100for development or business tenants). -
Language: Configure the supported logon language (e.g.
EN,DE). - Non-ABAP System: Checked (activates pure OData/API mode)
[!NOTE] Checking Non-ABAP System activates pure OData/API mode, suppressing classic ADT workbench and Agent RPC requirements. Client and language parameters can and should still be configured whenever required by target OData services or gateway routing.
-
Host:
-
Click Save System.
When you assign multiple communication arrangements to the same technical user, point the dashboard liveness probe to SAP's standard OData Catalog Service:
- On your system card in the Web Dashboard, click the Agent Settings icon ().
- Set API Root Path to:
/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/ - Save the settings.
-
Universal Catalog:
/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/lists all OData services exposed to the authenticated user. - Arrangement Agnostic: It verifies end-to-end connectivity, TLS, and basic auth credentials without binding the health check to a single specific business object.
-
Standard OData Document: It returns an AtomPub service collection document, resolving cleanly with HTTP
200 OKon the dashboard.
Once configured, AI agents can query any active communication arrangement using the sap_odata_call tool:
{
"system_alias": "JYF-100",
"service_path": "/sap/opu/odata/sap/API_SALES_ORDER_SRV",
"entity_set": "A_SalesOrder",
"action": "READ",
"select": "SalesOrder,SalesOrderType,SoldToParty,TotalNetAmount,TransactionCurrency"
}{
"system_alias": "JYF-100",
"service_path": "/sap/opu/odata/sap/API_BUSINESS_PARTNER",
"entity_set": "A_BusinessPartner",
"action": "READ",
"filter": "BusinessPartnerType eq '0001'"
}