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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mora11
Helper I
Helper I

Paginated report embedded for your customer, RLS and CUSTOMDATA()

Hello,

I'm using Power BI Premium and additional web application with its own authentication. I have published Power BI report and I am using service principal to communicate Power BI service wit web application. I am passing a parameter from web app to PBI service to know, who is logged in and I am reading that information using CUSTOMDATA() for RLS purposes. It works perfectly well.

However, I have published Paginated Report with very same set up and it turned out CUSTOMDATA() retreives null, USERPRINCIPALNAME() and USERNAME() both retreive my login as a report publisher for each logged in user and built in (native) Report Builder function UserID retreives the same string for each logged user as well (it may be my GUID). Question: How to retreive in Paginated Report who is logged in to web app? How to get the same information like CUSTOMDATA() in Power BI but in Report Builder?


Thanks

5 REPLIES 5
mora11
Helper I
Helper I

@Microsoft, can you help?

d_gosbell
Super User
Super User

Paginated Reports do not have a CustomData property that can be passed on to the semantic model's CustomData property. You need to use the UserID to tunnel custom RLS information if you are using Paginated Reports as documented here Use row-level security when embedding paginated reports with Power BI embedded analytics content - P...

Thanks for your answer. I have read that article and I don't quite get that part about token generation. Currently in my case UserID function retreives string like the following pattern "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" and it displays the same for each user. What will change after token generation? UserID will retreive different values for each user? Should I generate token for each and every user? I just need to know who is logged to my custom web application. Thanks

 


@mora11 wrote:

What will change after token generation?


You must currently be generating a token for the embedding to be work, you just need to push the value you are injecting into the CustomData into the User value for the token.


@mora11 wrote:

Should I generate token for each and every user?


Yes, you should be doing this already


@mora11 wrote:

 I just need to know who is logged to my custom web application. Thanks


Your app should already know this as it should be doing it's own authentication. What you need to do to get the RLS to work with a paginated report is to push the value you want to use for filtering in your RLS rule into the User field so that this can be passed on from the paginated report to the dataset UserName() function.

No, the case is that USERNAME() in Paginated Reports retreives service principal id instead of user id. Built in function UserId does not recognize custom users properly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.