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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
BharathM
Helper IV
Helper IV

Issue with the UserID parameter in local report vs Published report in PowerBI Services

Hi Everyone,
Hope everyone doing well!

We are using parameters in the Power BI Report Builder paginated report. A parameter was created with the following code:

 ="[table].[columnname].&["+ User!UserID +"]"

In the default values, we used a specific Values above expression, These parameters are being passed into the embedded dataset, and the report is working locally for a specific user.

 

The source is an MDM cube using an MDX query.

 

While the report works locally in the Power BI Report Builder application, when published to Power BI Service, it is not working. Instead of showing the system UserID in the parameter values, it displays the email ID of the Power BI Service.

 

We need the system ID to appear in the parameter values so it can be passed into the dataset for the report to work.

For the UserID, it is showing the system name locally, and we need the same behavior in Power BI Service.

Thanks in advance

2 REPLIES 2
v-jtian-msft
Community Support
Community Support

Hi,@BharathM .I am glad to gelp you.

The problem you are experiencing often occurs when setting up dynamic RLS in power bi (setting up RLS for .rdl files/pbix files)

I think a good suggestion for this solution is to add a user mapping table to your paginated reports
This is used to map the power bi service account that the user logs in with to a local domain username.

(This allows you to indirectly use the local domain name to set up the RLS, but actually use the Power BI Service account)
User logs into Power BI Service > user table maps to local domain name based on Service account name > displays the data that the actual user should see based on the domain name.
The reason for the problem is that the UserID expression in the paginated reports does not return the same result in the local domain (Power BI Report Builder) and in the cloud (Power BI Service).
This is also described in the official documentation given (essentially you should use the power bi service account as a judgment condition for RLS if you want the user to access the report in Power BI Service and not in Power BI Report Server)
PS: In Power BI Report Server, the reports you produce are perfect because the UserID always returns the local domain name.

vjtianmsft_1-1737511577157.png

Hopefully my test below will help you out!
You need to create a user mapping table
Map the user's service account to the local domain when the user accesses the paginated reports.
Hopefully the following issue will help you Hopefully my test below will help you.
You need to create a user mapping table
When a user accesses a paginated reports, the user's service account is mapped to the local domain.

Solved: Data masking in paginated reports - Microsoft Fabric Community
like this:
 The Mapping table you need to create

INSERT INTO UserMapping (ServiceAccount, LocalDomain)

VALUES ('user@example.com', 'VM0/admin01');

 

vjtianmsft_2-1737511676696.png

You may need to create new parameters to appropriately modify your screening logic.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-jtian-msft  I have added new datasets.

In these, we have UserID and EmailID.

Now, please tell me the parameter logic. How should I create the parameters? For the existing datasets, we don’t want to change the MDX query. The UserID will need to be passed in those datasets. Can you please provide the logic?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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