Forum Discussion

tfraletti's avatar
tfraletti
Icon for Helper I rankHelper I
5 years ago
Solved

RLS + Embed Link. How can i use RLS with PBI email&pass auth to access a report outside PBI Service?

Hello everyone, hope you're doing well.

 

I have a client that wants to use Power BI Reports on his on application. The way we're approaching right now is basically creating a share link for the reports and then he adds this link to his application - which works well for reports that doesn't require RLS.

 

But now came the day that he needs to limit some users access data using RLS. He wants that the report consumers could access the report from inside his app and use the already autenticated e-mail and pass from microsoft account to consider the RLS roles.

 

The question is, how can i do that? Because when i create RLS roles, the embed link option desappears. Also, the reversal, if i try to check which user is logged in accessing the report using USERPRINCIPALNAME() with a shared link, the return is NULL, ie. accessing the web shared report though the shared link doesn't capture the user logged by standard.

 

Thanks in advance for your support.

 

Stay safe.

  • sorry, just figured out. since i don't have a pro accoubt myself, i couldn't see the publish to site or portal option, but testing it on a power bi pro account, this would be my way to go. cheers.

7 Replies

  • Hi tfraletti 

     

    When using RLS you would need to get each user to log into the PBI Service in order to get the UserPrincipalName to find out who they are and to then apply the RLS.

     

    From your message it sounds like you are using Publish to Web Link. If you are that is a limitaiton of publish to web in that you CANNOT use RLS with Publish to Web.

     

    Publish to web from Power BI - Power BI | Microsoft Docs

     

    To work around this you would need to get a Power BI Pro license for each user who access the report.

    • tfraletti's avatar
      tfraletti
      Icon for Helper I rankHelper I

      Hello,

       

      they all have pro licenses already, they just want to see the report outside power bi service, but considering RLS. is it possible?

  • Hi tfraletti 

     

    Yes it would be possible, as long as they log in with their credentials it will work.

    • tfraletti's avatar
      tfraletti
      Icon for Helper I rankHelper I

      GilbertQ, could you please elaborate which would be the link used for the users to access the report outside the power bi service environment? because any link i got on power bi service redirect people inside of it.

    • tfraletti's avatar
      tfraletti
      Icon for Helper I rankHelper I

      sorry, just figured out. since i don't have a pro accoubt myself, i couldn't see the publish to site or portal option, but testing it on a power bi pro account, this would be my way to go. cheers.