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);
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);
2. I want to be able to filter my report even before it loads, ( I am creating an app so my clients can see their data through a Power Bi report, but I want to filter it by their IDs even before it loads, because one client may not see each other data) is it possible to do so?
I'm currently using the Api Rest from python i've add my custom report in my application getting a embed token and i've been reading about add filter in my report, but just i've find information about how i can how do with the JavaScript SDK but i dont have information how i can add a filter through the Api Rest , someone could give to me some information about that, How can i add filter to report through the Api Rest i had reading that http://docs.powerbi.apiary.io/# (sorry for my english haha)
- jamesyoung8 years agoFrequent Visitor
Here is the information on adding filters through JavaScript API.
https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters