This section explains how to embed the Bold BI dashboard into an ASP.NET MVC sample application by providing the dashboard URL. In this sample, we have rendered the dashboard embedding using Single Sign On (SSO) with Token-based authentication. The explanation is concise.
Please retrieve the sample of the Iframe Dashboard embedding ASP.NET MVC from GitHub.
You are required to set the following properties in the EmbedProperties.cs
file as follows.
UserEmail | UserEmail of the Admin in your Bold BI, which will be used to get the dashboard. |
EmbedSecret | Get your EmbedSecret key from embed tab by enabling Enable embed authentication in the Administration page. |
DashboardUrl | Get the dashboard URL of the dashboard in your Bold BI. |
Once you have configured the above embed properties, you can proceed to run your MVC application.
The dashboard will be rendered in the iframe using SSO with token based authentication, based on the DashboardUrl
and other values set in the EmbedProperties.cs
file.
The Embed parameters and the Embed Secret Key are mandatory parameters used to generate the Embed Signature
. The embed signature
files a hashed value generated for authentication in an embed request to the Bold BI server. It is obtained by using the SignURL
method with the embedParameters
and embedSecretKey
, and it is then appended to the iframe URL as the embed_signature
query parameter.
In index.cshtml
, the variables embedSignature
and dashboardUrl
are retrieved from HomeController.cs
and EmbedProperties.cs
respectively. The iframe URL is formed by appending the embed signature and parameters to the dashboard URL. This URL is then used to render the dashboard within an <iframe>
element.
NOTE: You have the ability to customize the optional parameters within the
HomeController.cs
file.