Embed the Reporting Hub in Your App

A scenario we're often asked about is how to embed the Reporting Hub inside an existing application. Technically, this is done by loading the Reporting Hub inside an iframe element on one of your app's pages. Below we describe several ways of embedding the Reporting Hub in your app.

The biggest challenge with embedding the Reporting Hub in an iframe is authentication. Most authentication providers, like Microsoft and Google, will block their login pages from loading in an iframe, which means that your end users won't be able to log in to the embedded Reporting Hub.

You need to have an Enterprise or Commercial license to embed the Reporting Hub in an iframe.

Use the Reporting Hub as your OpenID Connect server

The best way to embed Reporting Hub reports in your app is to use the Reporting Hub as the OpenID Connect (OIDC) server for your application. This provides the smoothest experience: users log in to your app and can view the embedded Reporting Hub without having to log in again in the iframe. You can use any of the supported authentication schemes for your Reporting Hub: Microsoft SSO, Okta, OpenId, etc.

What happens when using the Reporting Hub as your OIDC server is:

  1. Users will go to your app (yourapp.com) and be redirected to your Reporting Hub site, which in turn will redirect to your authentication provider.

  2. Once they've logged in successfully, they'll be redirected back to your app. Your Reporting Hub site will pass along the authorization token to your application.

  3. When a user clicks on the page in your app with an embedded report, it will load because they're already authenticated with the Reporting Hub.

See the following documentation for instructions on using the Reporting Hub as an OpenID Connect server.

Configure your app to load Reporting Hub login in a new window

If you can't use the Reporting Hub as the OIDC server for your app, the next best solution is to configure your app to load the Reporting Hub login in a new window, then return to your application once login is complete. This solution requires users to login once to your app, then to log in again to the Reporting Hub.

Configure your identity provider to allow loading in an iframe

If neither of the two solutions above will work for you, the next best solution is to configure your identity provider to load in an iframe if you can. Your identity provider must allow you to configure this setting; most identity providers do not.

If none of the above solutions are possible, you can embed the shareable links created by the Reporting Hub in your app.

When generating the share links, be sure to set 'Require users to log in' to No, and set the link expiry date as far in the future as you'll need. If the report you're linking to uses row-level security, keep in mind that the share links use the role of the person generating them.

This approach is the least desirable, because it requires you to generate a link for each report you want to embed. It's also less secure: the share links can be accessed without logging in to the Reporting Hub.

Learn more about generating share links.

Last updated