cancel
Showing results for 
Search instead for 
Did you mean: 

Multitenancy provisioning API and provider account application

neilprince
Participant
0 Kudos

Hi Community

Thanks to andrew.lunde for his great blog on the CAP multitenancy solution I have a the multitenat application up and running in my production account. Subscribing and unsubscribing work and I can connect to and confirm the data separation is occurring in the HDI containers.

I have two issues relating to the same error message. Should I be able to use the multitenant application in the provider subaccount? As I mentioned, it is deployed and subscriptions are working fine. I have now added securoty roles to myself in the provider account and open the application link. I am presented with error message:

{"error":{"code":"null","message":"Internal Server Error"}}

When looking at the logs of the srv, I see the following:

I was advised I neede to run the provisioning API to 'subscribe' as the provider so I am using the postman collection provided in the CAP documentation. When I execute the /mtx/v1/provisioning/tenant/<<tenantid>> I receive the same error message and the same entries in the log.

My first question is - is the tenant id required for this URL the id of the subdomain? Looking at the pattern for the subscriber accounts, this appears to be the case but would like to confirm this.

I then thought maybe it is a provider account issue, so I thought I would confirm the provisioning URL is working by creating a subaccount for a new subscriber and using the sub account id as the tenantid for the /mtx/v1/provisioning/tenant/<<tenantId>>. However, I got the exact same error for the subscriber account.

Am I using the provisioning API incorrectly? What is the actual origin of the error message instance.credentials are missing and what is the cause? It is curious that I am getting this message from both the provisioning API and when I try and execute the app in the provider account.

I can see that it has been raised before in this question, but is not addressed in terms of this scenario.

Any insights appreciated.

Regards

Neil

Accepted Solutions (1)

Accepted Solutions (1)

former_member194549
Contributor
0 Kudos

Hi neilprince

> "Should I be able to use the multitenant application in the provider subaccount?"

No, not out of the box.
If you use CAP together with the MTX library, you will only use the "multitenant-style" of CAP.
If you access the application from your subscriber account, everything is fine, because this account has been onboarded.
But if you access the application from your provider account, you will get an error, because this tenant was not onboarded and there is no HDI container for it.

So you have to onboard your provider account e.g. by calling the provisioning endpoint with the tenant ID of your provider account. You can find this ID in the Cloud Platform Cockpit in the "Subaccount Details" of your subaccount, where you can also find the subdomain of the subaccount.

Afterwards the provider account should be onboarded and you should be able to use your application with it.

Regards
Simon

Answers (0)