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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-yuezhe-msft
Employee

@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

v-yuezhe-msft
Employee
Status changed to: Needs Info
 
Anonymous
Not applicable

Hello @v-yuezhe-msft , @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