When embedding Bold BI dashboards into your application for users who are not directly provisioned within the Bold BI platform, you can still maintain secure and personalized access using Row-Level Security (RLS). RLS allows you to dynamically filter the data users see, ensuring they only access information relevant to their role, organization, or identity — without requiring them to be explicitly added to the Bold BI system.
Managing thousands of users directly in Bold BI would be time-consuming and unnecessary. Instead, you use anonymous embedding to embed dashboards seamlessly into your application — and enforce Row-Level Security (RLS) rules based on the user’s identity.
To embed the dashboard using SDK-based embedding for an anonymous user, please follow these steps:
Enable the system user option on the UMS Accounts page to work with anonymous users. Once enabled, save the changes. This user will be added only to the Bold BI server database and will not be visible in the Bold BI users list.
Create a new group without adding any users and provide the necessary permissions.
You can achieve this anonymous user support using any of our embedding samples. For demonstration purposes, I have chosen the ASP.NET Core sample.
In the Index.cshtml
file, the provided div container can be used to display the dashboard. Additionally, a URL action method for the authorization server, which is defined in the HomeController.cs
file, is called from the JavaScript code.
<script type="text/javascript">
var authorizationServerUrl = "@Url.Action("AuthorizationServer", "Home")";
</script>
<body onload="renderDashboard(dashboardId)">
<div id="viewer-section">
<div id="dashboard"></div>
</div>
</body>
In Index.js
file, the renderDashboard() method will be used to render the dashboard in the specified container by creating a Bold BI instance and calling the loadDashboard() method.
function renderDashboard(dashboardId) {
this.dashboard = BoldBI.create({
serverUrl: rootUrl + "/" + siteIdentifier, // Bold BI Server URL with site identifier (Eg: http://localhost:5000/bi/site/site1).
dashboardId: dashboardId, // Provide the dashboard id of the dashboard you want to embed here.
embedContainerId: "dashboard", // dashboard container id.
width: "100%",
height: "100%",
authorizationServer: {
url: authorizationServerUrl
}
});
this.dashboard.loadDashboard();
};
Use the parameters below to check the functionality of the anonymous user in the authorization server section, which can be found in the HomeController.cs
file.
Parameter | Description | Example |
---|---|---|
embed_user_email |
Provide an anonymous user email who are not available in the Bold BI Server | [email protected] |
embed_anonymous_token |
Provide true or false to allow the anonymous user can embed the dashboard in embedding. | &embed_anonymous_token=true |
embed_authorize_group |
Provide the group name which will access by the anonymous user. | &embed_authorize_group=Alpha |
[HttpPost]
[Route("AuthorizationServer")]
public string AuthorizationServer([FromBody] object embedQuerString)
{
var embedClass = Newtonsoft.Json.JsonConvert.DeserializeObject<EmbedClass>(embedQuerString.ToString());
var embedQuery = embedClass.embedQuerString;
// Use any anonymous user-email as embed_user_email
embedQuery += "&[email protected]";
embedQuery += "&embed_anonymous_token=true&embed_authorize_group=Alpha";
//To set embed_server_timestamp to overcome the EmbedCodeValidation failing while different timezone using at client application.
double timeStamp = (int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;
embedQuery += "&embed_server_timestamp=" + timeStamp;
var embedDetailsUrl = "/embed/authorize?" + embedQuery + "&embed_signature=" + GetSignatureUrl(embedQuery);
using (var client = new HttpClient())
{
client.BaseAddress = new Uri(embedClass.dashboardServerApiUrl);
client.DefaultRequestHeaders.Accept.Clear();
var result = client.GetAsync(embedClass.dashboardServerApiUrl + embedDetailsUrl).Result;
string resultContent = result.Content.ReadAsStringAsync().Result;
return resultContent;
}
}
Render the dashboard viewer. The dashboard is being rendered using the anonymous user.
You can also see the details of anonymous users in the Dashboard Usage Analytics dashboard.
Note: Support for anonymous users is provided only for the single dashboard viewer from the Bold BI Version 10.1.18.