4 Replies Latest reply on Aug 16, 2018 12:22 AM by Jeevan TM

    Tableau multi-tenant setup help with user having access to 2 or more sites

    Jeevan TM

      Hi,

       

      We want to use Tableau as our B2B reporting tool. We have multiple tenants and want to setup Tableau for them. We are creating sites for every tenant onboard and maintain multiple copies of same canned reports in their respective sites pointing to one database having data of all tenants.

       

      Requirements:

       

      (1) User A belongs to Site A ( tenant A ) should see data only of tenant A

      (2) User B belongs to Site B ( tenant B ) should see data only of tenant B

      (3) User C (admin) belongs to Site A & B ( tenant A & B ) should see data only of tenant A when logged into Site A & only tenant B when logged into Site B. Not both.

       

      We have managed to achieve (1) & (2), which is simplistic by having a security table joining with the fact/dim tables in db, and asserting the user with login names using the USERNAME() filter built using the calculated field 'USERNAME() = [user_login_name]'.

       

      However, (3) is something which is not implemented, and we don't have ideas to build this. Any help would be much appreciated!

       

      Things we have tried before:

      1.  ISMEMBEROF() function - we don't want the group names to be hardcoded in the calculations. It should by dynamic like the USERNAME() function. We will have frequent changes in groups, so we don't want hardcoded values because we don't want to edit & update the filters on 100+ datasources & reports we have.

      2. Try to use calculated field something like "USERNAME() = [user_login_name] and ISMEMBEROF([user_group_name])". But ISMEMBEROF() only accepts string literals. If we could loop [user_group_name] from the security table in the calculated field to extract strings out of the column should help.

       

      Is there a SITENAME() function just like USERNAME() available? That would solve this easily.

       

      Thanks,

      Jeevan

        • 1. Re: Tableau multi-tenant setup help with user having access to 2 or more sites
          Paulo Dantas

          Hi Jeevan,

           

          what I know is, if he is Admin, he will see all the sites, I don´t think his can just see A or B.

           

          Cheers.

          • 2. Re: Tableau multi-tenant setup help with user having access to 2 or more sites
            Jeevan TM

            Hi,

             

            I agree he can see both 'sites', but the need is, when User C select site and gets into the site and opens a report, he should see data for the tenant which is hosted on that site only. The importance is about the 'data' he sees in the site, not the site itself.

            • 3. Re: Tableau multi-tenant setup help with user having access to 2 or more sites
              Ritesh Bisht

              Hi Jeevan,

               

              Not sure if you can manage & sort  your datasource like below

               

              But if you can ,then have a look below

               

              DATA FOR SITE A & B both

              DATA                USER               ADMIN              SITE

              XHHHKK            A                        C                         A

              XHHHKK            A                        C                         A

              XHHHKK            A                        C                         A

              XHHHKK            B                        C                         B

              XHHHKK            B                        C                         B

               

               

              CALCULATION FOR SITE A

              (USERNAME= USER OR USERNAME=ADMIN)  AND SITE='A'

               

               

              CALCULATION FOR SITE B

              (USERNAME= USER OR USERNAME=ADMIN)  AND SITE='B'

               

              Set above both as True

               

              Thanks,

              Ritesh

              • 4. Re: Tableau multi-tenant setup help with user having access to 2 or more sites
                Jeevan TM

                Hi,

                 

                Thank you for the reply but this doesn't work and here's why:

                 

                1. It is impossible to model the data like in the table you showed, this requires duplication of data 'n' times for 'n' users. Every row should be duplicated for every user to make this work.

                2. User C which is mentioned in the original question is not exactly admin ( my bad, I should have made that clear ). A user of type User C can have access to multiple sites, like this - User ABC belongs to sites A,B,C, User XYZ belongs to site X,Y,Z. When they login to each site they are allowed to & open a report, they should see only that tenant's( data of A when site A, data of X when site X, data of B when site B, data of Y when site Y and so on) data. So there is no ONE admin by your answer, there are many users with multiple access to sites.

                3. We don't want any hardcoded values in the filters or calculated fields. By you answer SITE='A' and SITE ='B' is hardcoded. If a user gets revoked from accessing a site, this filter should be changed again to remove the entry for that site. Doing this on 100+ datasources we have is not feasible.

                 

                Thanks again!