Skip to main content
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

Power BI Embedded CUSTOMDATA not being passed to report

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,

    "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.



Community Support
Community Support

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:

Using row-level security with embedded content in Power BI embedded analytics - Power BI | Microsoft...


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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

Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.