Forum Discussion
Doubt about embed token and filtering.
- 8 years ago
Q1. You can follow these instructions to generate a token. You will need to know C#.
https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedding-content/
Q2. The filtering you are describing is called RLS(Row Level Security). You can pass in role when generating your token request that would allow each client to see their own data.
var generateTokenRequestParameters = new GenerateTokenRequest("View", null, identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: "username", roles: new List<string> { "roleA", "roleB" }, datasets: new List<string> { "datasetId" }) }); var tokenResponse = await client.Reports.GenerateTokenInGroupAsync("groupId", "reportId", generateTokenRequestParameters);
Hello,
I am a new user of Power Bi embedded (developing a webapp using javascript sdk) and I have two doubts.
1. Its still not clear how to get the acess token from Azure, should I just make a post request to this (https://api.powerbi.com/v1.0/myorg/groups/{group_Id}/reports/{report_id}/GenerateToken) api?
2. I want to be able to filter the report before it even loads ( I am creating reports for my clients, but I want to filter them by their ID, because one client may not see each others information), is it possible to do so?
Thank you very much.