Skip to content

Regarding the issue of getdestination method for the cloud sdk usage in Multitenant CAP application in BTP. #6492

@SSingiredd

Description

@SSingiredd

Describe the Question

I have created a multitennat saas application and using cloud sdk for destination. So when I use getdestination method using subscriber jwt getting below issue. Raised to SAP but they are helpless. Can someone look at this issue and let me know the workarounds.

 const destination = await getDestination({
            destinationName,
            jwt: req.headers?.authorization?.replace('Bearer ', ''),
            selectionStrategy: alwaysSubscriber,
            iss: `https://${tenantId}.authentication.sap.hana.ondemand.com`
        });
error - {"custom_fields":{"messageContext":"destination-cache","package":"connectivity"},"level":"warn","logger":"sap-cloud-sdk-logger","message":"Could not build destination cache key. Isolation strategy 'tenant-user' is used, but tenant id or user id is undefined in JWT.","msg":"Could not build destination cache key. Isolation strategy 'tenant-user' is used, but tenant id or user id is undefined in JWT.","timestamp":"2026-02-25T08:32:27.928Z","written_at":"2026-02-25T08:32:27.928Z","written_ts":1772008347928} 

 

{"custom_fields":{"messageContext":"destination-cache","package":"connectivity"},"level":"warn","logger":"sap-cloud-sdk-logger","message":"Could not build destination cache key. Isolation strategy 'tenant-user' is used, but tenant id or user id is undefined in JWT.","msg":"Could not build destination cache key. Isolation strategy 'tenant-user' is used, but tenant id or user id is undefined in JWT.","timestamp":"2026-02-25T08:32:28.048Z","written_at":"2026-02-25T08:32:28.048Z","written_ts":1772008348048}


{"custom_fields":{"messageContext":"destination-accessor-service","package":"connectivity"},"level":"warn","logger":"sap-cloud-sdk-logger","message":"Failed to fetch subscriber service token for destination. This is only relevant if you are using subscriber destinations. Failure caused by: Could not fetch client credentials token for service of type \"destination\".","msg":"Failed to fetch subscriber service token for destination. This is only relevant if you are using subscriber destinations. Failure caused by: Could not fetch client credentials token for service of type \"destination\".","timestamp":"2026-02-25T08:32:28.048Z","written_at":"2026-02-25T08:32:28.048Z","written_ts":1772008348048} 

JWT Token - ***

Regards,
Sunil SIngireddy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions