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.

USERNAME() and USERPRINCIPALNAME() return same on Report server 2019 january

Hello!

For report server 2018 august, the function username() return "domain\name" and function userprincipalname() return "principal name for user".

But for report server 2019 january, both return "principal name for user".

Please, fix the bug. USERNAME() must return "domain\name"

Thanks a lot.
Best regards.

Status: Needs Info
Comments
Anonymous
Not applicable

@jcespedes,

Do you check the value in Power BI report server or Power BI Desktop optimized for report server? Please check details about RLS in this article.

"Within Power BI Desktop, username() returns a user in the format of DOMAIN\User and userprincipalname() returns a user in the format of user@contoso.com.

Within Power BI Report Server, username() and userprincipalname() both return the user's User Principal Name (UPN), which is similar to an email address."




Regards,
Lydia

Anonymous
Not applicable
 
Anonymous
Not applicable

Hello @Anonymous , @jcespedes ,


Within Power BI Desktop optimized for report server Sept 2019, username() returns a user in the format of DOMAIN\User and userprincipalname() returns a user in the format of user@contoso.com.


Within Power BI Report Server Sept 2019:

  • In Import mode : username() and userprincipalname() both return the user's User Principal Name (UPN), which is similar to an email address.
  • In Direct Query mode : username() returns a user in the format of DOMAIN\User and userprincipalname() returns a user in the format of user@contoso.com.

Why the username function does not return the same thing IN import mode than in query mode ?
It looks like a bug, no ?

Best regards,

Mathieu