Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
We are implementing Power BI Embedded using Service Principal in App Owns Data mode.
We are also implementing RLS to restrict the access from end users to the data.
Both of these 2 features working fine.
In addition, we are trying to use RLS in combination of USERNAME() and CUSTOMDATA() so that to further restrict users’ access programmatically.
We managed to make RLS + USERNAME() working without much trouble. However, we couldn’t make CUSTOMDATA() working with RLS after trying everything.
At the application side, we use GenerateToken REST API to generate access token as the following,
POST https://api.powerbi.com/v1.0/myorg/groups/{workspace-Id}/reports/{report-Id}/GenerateToken
{
"accessLevel": "View",
"identities": [
{
"username": "SOME-USERNAME",
"customData": "SOME-CUSTOMDATA",
"roles": ["SOME-ROLE"],
"datasets": ["SOME-DATASET"]
}
]
}
At the Power BI side, we use Card visual to capture and display UserName and CustomData using USERNAME() and CUSTOMDATA() built in functions. The report shows only the UserName value but not the CustomData.
We don’t see any error anywhere, but in the Power BI Embedded report, only USERNAME can be captured but not CUSTOMDATA.
Any suggestion will be appreciated.
Hi @mingluacerorg,
How did these customdata configure on your database side? Can you please share some more detail about these?
How to Get Your Question Answered Quickly
In addition, you can also take a look at the following document customdata setting parts if helps:
Regards,
Xiaoxin Sheng
Hi Xiaoxin,
Thanks for your quick response.
We had gone through the document you referenced in an early stage of our project, but it didn't resolve the issue. According to our Power BI engineer, that document is more about Azure Analysis Services while our issue is that it is not working with Power BI workspaces.
Also, could you please be more specific about what database settings should be involved? We were trying to isolate the issue by merely displaying the value of CUSTOMDATA() passed in by the application, but never succeeded. Please kindly suggest if any settings at Power BI side we should look into.
Much appreciated
User | Count |
---|---|
5 | |
5 | |
2 | |
2 | |
2 |
User | Count |
---|---|
10 | |
7 | |
4 | |
4 | |
4 |