Dears, I am showing PBI Reports based on filter criteria selected by user. In order to show the reports, I am using Microsoft Power BI API in C#. It was working fine but suddenly start giving me following error:
You have exceeded the amount of embed token that can be generated on a shared capacity. You need to purchase Azure capacities to generate embed tokens. See https://go.microsoft.com/fwlink/?linkid=868976\
using (var powerBiClient = new PowerBIClient(new Uri(apiUrl), tokenCredentials))
{
var reports = powerBiClient.Reports.GetReportsInGroupAsync(groupId).GetAwaiter().GetResult();
var report = reports.Value.FirstOrDefault(rep => rep.Id == reportId);
var datasets = powerBiClient.Datasets.GetDatasetByIdInGroupAsync(groupId, report.DatasetId).GetAwaiter().GetResult();
var generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view");
var tokenResponse = powerBiClient.Reports.GenerateTokenInGroupAsync(groupId, report.Id, generateTokenRequestParameters).GetAwaiter().GetResult();
}
I am getting an error at last line (i.e. GenerateTokenInGroupAsync
). In order to resolve the issue, it is recommended to get the PBI Pro License but it is not possible in my case. So could someone recommend me any other way to get my work done instead of Publishing to Web and get the Embedded URL because I need to filter the report based on user selection.
Can I access and show the reports without access token or get the token without Pro license?