Forum Discussion
RLS not working with Power BI Service
- 5 years ago
Hi Anonymous ,
It should be noted that there is a difference between using the USERNAME() and USERPRINCIPALNAME() functions in Powerbi Desktop and Powerbi Service. In Desktop, the function returns not the UPN of the login account, but the local UPN. When you add a user in Desktop The result returned after the ID is correct, but if the account ID corresponding to the Service is not added in the Powerbi Service, the correct record cannot be displayed. As the above description shows that the result is empty, it illustrates this problem.
Username(),userprincipalname() return from desktop
Username(),userprincipalname() return from service
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
It should be noted that there is a difference between using the USERNAME() and USERPRINCIPALNAME() functions in Powerbi Desktop and Powerbi Service. In Desktop, the function returns not the UPN of the login account, but the local UPN. When you add a user in Desktop The result returned after the ID is correct, but if the account ID corresponding to the Service is not added in the Powerbi Service, the correct record cannot be displayed. As the above description shows that the result is empty, it illustrates this problem.
Username(),userprincipalname() return from desktop
Username(),userprincipalname() return from service
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.