An anonymous user who is not available on our Bold BI Server can embed a dashboard based on group-based authorization in the SDK-based embedding.
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.
Use the parameters below to check the functionality of the anonymous user in the authorization server section of any of our embedding samples.
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_user_email |
Provide the group name which will access by the anonymous user. | &embed_authorize_group=Alpha |
[HttpPost]
[Route("embeddetail/get")]
public string GetEmbedDetails(string embedQueryString, string dashboardServerApiUrl)
{
// Use your user email as embed_user_email
// This is the read-permission user in Bold BI, which has access to the data source linked to the dashboard.
embedQueryString += "&[email protected]";
// Adding custom attributes for the logged-in user.
embedQueryString += "&embed_anonymous_token=true&embed_authorize_group=Alpha";
// To set embed_server_timestamp to overcome EmbedCodeValidation failures when using different time zones in the client application.
double timeStamp = (int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;
embedQueryString += "&embed_server_timestamp=" + timeStamp;
var embedSignature = "&embed_signature=" + GetSignatureUrl(embedQueryString);
var embedDetailsUrl = "/embed/authorize?" + embedQueryString + embedSignature;
using (var client = new HttpClient())
{
client.BaseAddress = new Uri(dashboardServerApiUrl);
client.DefaultRequestHeaders.Accept.Clear();
var result = client.GetAsync(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.