cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Cloud Portal Service: Internal Server Error for subscriber tenant

gauravkr75
Employee
Employee

Hi,

I have created a CAP multitenant application on BTP. I am using the portal service to setup the Fiori launchpad. I have a provider subaccount where my services and app router is deployed and a consumer subaccount from where I have subscribed my application. After subscribing from the consumer account when I try to access the application using the returned tenant URL then I get Internal Server error. I am not sure what went wrong here and how to figure it out.

I see these errors in the approuter logs:

"msg":"GET request to /cp.portal/site completed with status 500 401 - {\"error\":\"unauthorized\",\"error_description\":\"Bad credentials\"}"}

"msg":"query does not exist for request url /cp.portal/site"}

johnny_zong
Discoverer

Hi gauravkr75, any progress of this issue. I met the same one.

former_member743968
Participant
0 Kudos

Was there any progress made on this issue? Also facing the same problem and it's unclear what authorization / authentication is missing in subscriber tenants to access the portal.

gauravkr75
Employee
Employee
0 Kudos

No. I am also stuck at this point. Let me know if you guys are able find anything.

a_oezsoy
Explorer
0 Kudos

Hi, were you able to solve the issue?

View Entire Topic
a_oezsoy
Explorer

Hi,

2 things I found to be helpful were:

1. Don't forget to attach your portal service instance also to your server application.

modules:
  # SERVER
  - name: myserver
    ...
    requires:
      ...
      - name: my-portal

2. Make sure your getDependencies function returns the attached portal service as well.

// server.js
...
  // getDependencies function implementation
  srv.on('dependencies', async (req, next) => {
    let dependencies = await next();
    const services = xsenv.getServices({
      ...
portal: {tag: 'portal'} }); dependencies = Array.isArray(dependencies) ? dependencies : [dependencies]; ...
dependencies.push({xsappname: services.portal.uaa.xsappname}); });
...