In Power BI Service the username and userprincipalname both return the email address, it's only in Power BI Desktop that username is domain/username rather than the email address. So I agree that userprincipalname is better generally as you always get the same value, the answer is correct and you can use username as your RLS since the role will be applied in the Service. See https://community.powerbi.com/t5/Community-Blog/USERNAME-v-s-USERPRINCIPALNAME-in-RLS-for-Power-BI-Embedded/ba-p/1867670 for more information.