Set up the SAP Cloud ALM integration
Connect Glasslake to your SAP Cloud ALM instance with an SAP BTP service key, and then link a project to sync its Cloud ALM data. You configure SAP BTP first, then add the credentials in Glasslake, and then link a project.
Before you begin
- You need an SAP BTP account with SAP Cloud ALM provisioned.
- You need administrator access to the SAP BTP subaccount.
- You need the organization admin role in Glasslake.
Part 1: Create a service instance and service key in SAP BTP
Even if you already have a service instance, don't skip steps 4 to 9. The most common cause of the "403 Forbidden — Missing CALM API scopes" error is an existing instance that never received the permissions below. For an existing instance, select it, select Update Instance, and apply the JSON.
- Go to the SAP BTP Cockpit and sign in with your SAP credentials.
- Select your Global Account, and then the Subaccount where SAP Cloud ALM is provisioned.
- Go to Services > Instances and Subscriptions.
- Select Create.
- In Service, select SAP Cloud ALM API. In Plan, select standard.
- In Instance Name, enter a name, for example
glasslake-calm-integration. - In the Parameters section, switch to JSON mode. The visual editor, which appears by default, ignores pasted text.
- Paste the parameters JSON below.
- Select Create, or Update for an existing instance.
- Select the instance, go to the Service Keys tab, and then select Create.
- Enter a name, for example
glasslake-key, and then select Create. - On the new service key, select View Credentials, and then select Copy JSON.
These are the minimum permissions the integration needs:
{
"xs-security": {
"xsappname": "luzid-calm-integration",
"authorities": [
"$XSMASTERAPPNAME.calm-api.projects.read",
"$XSMASTERAPPNAME.calm-api.processmanagement.read",
"$XSMASTERAPPNAME.calm-api.tasks.read",
"$XSMASTERAPPNAME.calm-api.tasks.write",
"$XSMASTERAPPNAME.calm-api.testcases.read",
"$XSMASTERAPPNAME.calm-api.testcases.write",
"$XSMASTERAPPNAME.calm-api.documents.read",
"$XSMASTERAPPNAME.calm-api.documents.write",
"$XSMASTERAPPNAME.calm-api.documents.delete"
],
"oauth2-configuration": {
"credentialTypes": ["binding-secret"]
}
}
}
A service key created before you applied these permissions doesn't inherit them. After you create or update the instance, always create a new service key and use its JSON in Glasslake.
The service key JSON contains your client ID, client secret, and other authentication credentials. Keep it private: don't share it in chats, tickets, or public repositories, and don't edit it before you paste it.
Part 2: Add the credentials in Glasslake
- In Glasslake, go to Settings > Organization > Integrations.
- In SAP Cloud ALM, select Configure.
- In Connection Name, enter a name, for example "Production CALM".
- In Service Key JSON, paste the entire JSON. Glasslake parses and validates the credentials.
- Select Save Configuration.
Part 3: Link a project
- Open the project you want to link.
- Go to Settings > Project > General, and scroll to SAP Cloud ALM.
- Select Link Project.
- Select the connection you configured in part 2.
- Select the Cloud ALM project from the list.
- Select Link Project.
- Select Sync (the circular arrow icon) to start the initial sync, and wait for the progress indicator to finish.
Result
In the project's Knowledge base, a read-only folder named CALM: [Project Name] contains the imported Cloud ALM data. Open it to verify the content.
Troubleshooting
| Error | What to do |
|---|---|
| "403 Forbidden — Missing CALM API scopes" when you link or sync a project | The service instance behind your key doesn't have the calm-api permissions, usually because part 1 was skipped or the JSON was pasted in the visual editor. Apply the JSON to the instance in JSON mode, create a new service key, edit the connection in Glasslake with the new JSON, and then link the project again. |
| "Failed to authenticate with CALM" | Check that the service key JSON is complete and that the key wasn't deleted. Try a new service key. |
| "Invalid JSON" | Copy the complete JSON with Copy JSON in SAP BTP, and don't edit it. The JSON contains both endpoints and uaa sections. |
| You can't find the SAP Cloud ALM API service. | Make sure SAP Cloud ALM is enabled in your subaccount, or ask your SAP BTP administrator to enable the service. |
If the error persists, contact support@luzid.io with the exact error text and the name of the Cloud ALM connection.
Security best practices
- Keep service keys confidential.
- Rotate credentials by creating new service keys periodically.
- Use separate keys for different integrations.
- Grant only the minimum API scopes.