Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Can't achieve RLS using CustomData() in Power BI desktop embedded report using service principal

Hello, I have found this article The CustomData feature is now generally available in Power BI! | Microsoft Power BI Blog | Microsoft... and this video

However, I am unable to reproduce the same results. I have performed the following steps:


1. I am using the same resources at GitHub - PowerBiDevCamp/RowLevelSecurity: Demo files from the Power BI Dev Camp session on Row Level....

2. I have uploaded the report (...)\RowLevelSecurity-main\PBIX\Wingtip Sales RLS with CustomData.pbix since its the one with the same table structure as used in the video. There is another one at (...)\RowLevelSecurity-main\RowLevelSecurityWithCustomData\RowLevelSecurityWithCustomData.pbix but different table structure, to my default workspace in

3. I have updated the (...)\RowLevelSecurity-main-v2\RowLevelSecurity-main\RowLevelSecurityWithCustomData\RowLevelSecurityWithCustomData\appsettings.json with the TenantId, ClientId, ClientSecret, WorkspaceId and CustomDataReportId and started the solution in debug mode.

I have noticed it is not https, but the page loads, however no report is displayed.


This is how the report displays in


This is how it is displayed for User 1 (default)


This is how it is displayed for user 2



I have found the syntax for ContainsString here CONTAINSSTRING – DAX Guide is different from the one used in the video (ContainsString(CustomData(), [State]), however, I have tried switching it up but to no avail.

Can someone please help?
Thank you for your time, let me know if you need more information.

Frequent Visitor

Im bumping this thread again as some time has passed, I have talked to functional support and after they advising on requesting technical support, nobody has contacted me to help me with this.

Hi @evolveblurt , were you able to solve the issue?

Hello Pedro, unfortunately not. Can you help?

Community Support
Community Support

Hi @evolveblurt ,


Based on the above information, if you are a Power BI Pro licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.
It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.


The link of Power BI Support: Support | Microsoft Power BI

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Power BI Community


Best Regards,
Community Support Team _ Caitlyn

Thank you Cailtlyn!

Frequent Visitor

Hello everyone, it has been a week, I'm adding this comment to bump this thread. Anyone else can help?

Community Support
Community Support

Hi @evolveblurt ,


The CustomData feature allows you to add a Row filter by passing a free text (string) using the CustomData connection string property. Unlike users and roles, CustomData can't be set within a .pbix file.

Did you refer to this article and complete the preparation for custom data?

Using the CustomData feature 


Best Regards,
Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

@v-caitlyn-mstf do you have any news on this topic? I have contacted functional support but after they redirected me to technical support, nobody from the technical support has replied back.

Can you please redirect me to someone else who might be able to help?

Hello Caitlyn, thank you for your reply.

I'm affraid I didn't fully understand. I have followed the exact same steps as explained in the video, the RLS is indeed set at the .pbix level.


Are you suggesting using Analysis Services? Because if that is the case, that is what I want to avoid.

Helpful resources


2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.