3 Replies Latest reply on May 25, 2017 7:21 AM by Matt Coles

    Embedding Tableau views in iframe: customize response if user doesn't have permissions

    Charles Ayotte-Trépanier

      Hi,

       

      We're embedding Tableau views in a web page using iframes. Everything works fine, except that we don't like what is being displayed when the user doesn't have permissions to a view:

      no_access.jpg

       

      Is there any way we can determine if a user has access to the report they're trying to visualize, and display a custom message if they don't?

       

      I've tried using the REST API to get user accesses, and actually succeeded. However, my solution is very slow (10 seconds to get my result.)

       

      In fact, either I query the workbook permissions but then also have to iterate through all the groups to find their users. Or I sent a request to  '/api/2.4/sites/site_id/users/user_id/workbooks' which doesn't seem to accept filters, and might then return 1000+ workbooks (which will take quite some time.)

       

      Beside, that REST API solution would require me to give the web developpers admin site role, which I'm not too comfortable with.

       

      Do you know of any way we could customize the iframe based on whether user has access to the embedded view or not?

       

      Thanks!