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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mingluacerorg
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,

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.

 

power-bi-embedded.JPG

2 REPLIES 2
Anonymous
Not applicable

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

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

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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