Connect SAP BTP🔗
Lightrun reads your BTP global account and its subaccounts: their names, regions, subdomains and provisioning state. It uses them to tell which subaccount a ticket belongs to, such as a region or plant. With optional subaccount keys, it can also read environments, application subscriptions and service instances.
Who does it: your SAP BTP admin.
Prerequisites🔗
- Access to the SAP BTP global account that holds the subaccounts Lightrun should know about.
- The Space Developer role in the Cloud Foundry space where you create the instances. Subaccount Administrator alone isn't enough.
- The Cloud Management Service (
cis) entitlement with plan central-viewer. - Optional, for each subaccount Lightrun should look inside: the Cloud Management Service
local-viewerand Service Managersubaccount-auditentitlements, and the subaccount's Subaccount ID. - HTTPS access from Lightrun to SAP BTP (
*.hana.ondemand.com,*.cloud.sap).
Walkthrough🔗
Click through the setup screen by screen, or follow the written steps below.
Which keys you need🔗
| Key | Service and plan | Required? | Tool categories | Scopes the token must carry |
|---|---|---|---|---|
| Global account | Cloud Management Service (cis), central-viewer | Required. Create it in any one subaccount. | Accounts, Entitlements | global-account.read, global-account.subaccount.read, global-account.account-directory.read; plus global-account.entitlement.read for Entitlements |
| Per subaccount | Cloud Management Service (cis), local-viewer | Optional | Environments, Applications | subaccount.environment.read, subaccount.application.subscription.read |
| Per subaccount | Service Manager, subaccount-audit | Optional | Service instances | subaccount.service_instance.read |
The plans grant these scopes on their own, so the keys need no extra parameters. See SAP's Cloud Management service plans and scopes.
Step 1: Create the keys in SAP BTP🔗
- Go to Services → Instances and Subscriptions → Create. Choose Cloud Management Service, plan central-viewer, runtime Cloud Foundry, and give it a name. No parameters are needed.
- Optional: in each subaccount Lightrun should look inside, create Cloud Management Service with plan local-viewer, and Service Manager with plan subaccount-audit.
- Wait until each instance shows Usable.
- Open each instance and click Create under Service Keys. Name it and leave the parameters as
{}. The key uses OAuth client credentials. - Copy each key's full JSON. For each subaccount, also copy the Subaccount ID from its Overview page.
Step 2: Connect in Lightrun🔗
- Go to Connectors, search for BTP and click Connect on SAP BTP.
- Paste the
central-viewerkey into Global account service key JSON. - Choose Tool categories. Accounts is the minimum. Accounts and Entitlements need only the global account key. Environments, Applications and Service instances need subaccount access.
- Optional: click Add subaccount access for each subaccount, up to 50. Enter the Subaccount ID and paste its
local-viewerandsubaccount-auditkeys. Lightrun checks that each subaccount belongs to the connected global account. - Click Test connection. Connected means every category you ticked works. If a subaccount fails, the test names it and the reason.
- Click Add, then add the connector to your workflow's agent.
Step 3: Network🔗
Nothing to open on your side. Lightrun connects to SAP BTP over HTTPS, and only accepts endpoints under *.hana.ondemand.com or *.cloud.sap. It gets its token from the token endpoint in each service key.
Check it works🔗
Ask Lightrun to list your subaccounts. Check that the names, regions and subdomains match the BTP Cockpit, and that the provisioning state is correct.
Matching records to subaccounts
If several subaccounts share the same S/4HANA plant number, Lightrun matches a record to its subaccount by the subaccount subdomain. Keep subdomains meaningful, for example acme-israel-plant-b.
Troubleshooting🔗
| What you see | What to check |
|---|---|
| "SAP token lacks required read scopes" | The field holds a key from the wrong plan. Use a central-viewer key for the global account field. |
| "The service key belongs to a different subaccount" | Create the local-viewer and subaccount-audit instances in the subaccount whose ID you entered. |
| "Add cis local-viewer credentials for this subaccount" | A category is ticked but the subaccount has no key for it. |
| "You are not authorized to perform the requested action" | Add your user to the Cloud Foundry space as Space Developer. |
| The token is rejected | Check that the key is central-viewer for the right global account. For subaccount reads, check that each key belongs to that subaccount. |