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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
samsonfr
Frequent Visitor

Power BI Report Server : UserPrincipalName() or UserName() not useful when using Forms Auth

I successfully managed to test Power BI Report Server using Forms Autentication based on this security sample :

https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample

 

I was able to create a user and set it as administrator.

 

Now, in my Power BI analysis, I would like to retrieve the name of the current form user using either UserPrincipalName() or UserName() DAX function. Problem is that :

 

- UserPrincipalName() returns <servername>$@domain.com

- UserName() return NT SERVICE\PowerBIReportServer

 

Whereas, when using Windows Authentication, it returns respectively email and windows login ...

 

Is is a bug? Any other way to get the logged in user name?

 

Frederick

 

 

2 REPLIES 2
oliviernicollet
Frequent Visitor

Hello, did you find any solution to filter user data when using form auth in Power BI Report Server?

samsonfr
Frequent Visitor

I got a response from Microsoft support :

 

"The issue we are seeing is considered a  by Design behavior. As PBI connects to Azure Analysis Services (AAS) internally and AAS takes only Windows Credentials. When Forms Authentication is used, it uses the Credentials of PBI RS (which is Service account) as Windows username is not available."

 

So Forms Authentication for PBI Report Server should only be used to define autorizations on folders and files. As there is no way of getting the form user name from within Power BI (using DAX for example), it cannot be used to filter data automatically by on the user.

 

Frederick

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.