We have written an extension for Appsource that uses javascript to read the tenant ID and company from the URL and passes those values to our app (which is displayed in an iframe).
This doesn't always work though in all scenarios. Business Central offers multiple login paths. Some of these paths don't display a tenant ID in the URL, which causes an error in our app.
Is there a more reliable way to get the tenant ID using javascript than reading it from the URL?