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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MattStannett
Frequent Visitor

How to configure UPN mapping/CustomData for Azure Analysis Services and PowerBI Embedded

Similar to this question.

 

I have a .Net Core Web App that embeds a PowerBI report, this report needs has Row Level Security applied at the data level in **Azure Analysis Services** using an on-premises data gateway.

 

I have configured the `EffectiveIdentity` to pass through the UPN using the `CustomData` option, I have also setup a role and DAX query on the role to filter the rows.

I have also setup the SQL Server Profiler as per this post and can confirm that the values being set inside `CustomData` are being passed through to Analysis services.

 

In the non-Azure version of Analysis Services, you can configure the data gateway inside the PowerBI web portal to map usernames. Since someone else setup the gateway (in Azure), and Azure Analysis Services is not a supported Data Source Type (not an option in the dropdown).

 

I need to know if it is possible to view/change the Effective User names/CustomData setting.

1 ACCEPTED SOLUTION
MattStannett
Frequent Visitor

So I finally figured this out, as far as I can tell UPN mapping is enabled by default.

 

In my specific case I ended up using the `CustomData` option as per the docs. Initially this wasn't behaving as expected because on my Azure Analysis Services Database I had two row filters, one on the main data table that was comparing the user's email against the `USERPRINCIPAL()` DAX function, then the filter that I added against the user table comparing the user's email against `CUSTOMDATA()` DAX function.

 

To get this to work I ended up removing my own filter against the user table and replacing the use of the `USERPRINCIPAL()` function in the initial filter with `CUSTOMDATA()` - I verified this change with our BI guy and he was happy with it.

 

I hope this saves someone else the trouble I had.

View solution in original post

1 REPLY 1
MattStannett
Frequent Visitor

So I finally figured this out, as far as I can tell UPN mapping is enabled by default.

 

In my specific case I ended up using the `CustomData` option as per the docs. Initially this wasn't behaving as expected because on my Azure Analysis Services Database I had two row filters, one on the main data table that was comparing the user's email against the `USERPRINCIPAL()` DAX function, then the filter that I added against the user table comparing the user's email against `CUSTOMDATA()` DAX function.

 

To get this to work I ended up removing my own filter against the user table and replacing the use of the `USERPRINCIPAL()` function in the initial filter with `CUSTOMDATA()` - I verified this change with our BI guy and he was happy with it.

 

I hope this saves someone else the trouble I had.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.