Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a report where I've created a role "customer" with DAX expression "[ColumnName] = USERNAME()". I'm trying to get an embed token for this report through the C# API using app only auth:
string applicationId = "***", applicationPassword = "***",
datasetId = "***", groupId = "***", reportId = "***";
var context = new AuthenticationContext("https://login.microsoftonline.com/tenantId/");
var clientCredential = new ClientCredential(applicationId, applicationPassword);
var result = context.AcquireTokenAsync("https://analysis.windows.net/powerbi/api",
clientCredential).Result;
var authHeader = new TokenCredentials(result.AccessToken, "Bearer");
var client = new PowerBIClient(new Uri("https://api.powerbi.com"), authHeader);
var tokenRequest = new GenerateTokenRequest(TokenAccessLevel.View,
datasetId, new EffectiveIdentity("42", new List<string> { datasetId },
new List<string> { "customer" }));
var embedToken = client.Reports.GenerateTokenInGroupAsync(new Guid(groupId),
new Guid(reportId), tokenRequest, cancellationToken: CancellationToken.None).Result;
When I call the GenerateTokenInGroupAsync method, I get a Bad Request error with the following message: "InvalidRequest: Creating embed token for accessing dataset <datasetId> shouldn't have effective identity". What am I doing wrong here?
Thanks in advance
My takeaway from the presentation today is that RLS is not supported in the "App owns data" model.
I looks like that might be the case.. Do you have any advice for an approach in my case where we'd like to offer embedded reports to our customers - we're looking at starting with one report with a dataset containing all customers' data. What is the "correct" approach for this case? One report, but with a unique dataset for each customer?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 |