5 Replies Latest reply on Oct 15, 2018 1:48 PM by Santhosh Sekar

    List all project leaders in the Tableau Server

    Santhosh Sekar

      Hi,

       

      Do we have a way to list all the project leaders in the Tableau server or site level?

       

      Thank you

        • 1. Re: List all project leaders in the Tableau Server
          Santhosh Sekar

          Would like to know how we can achieve this from postgres? Basically the requirement here is, we need to change the site level role for all the project leaders on the server.

          • 2. Re: List all project leaders in the Tableau Server
            arvindgarg

            you need to unlock readonly user in workgroup database.

            Then use below SQL

             

            select distinct

            project.name as "project_name",

            susers.name as "user_name"

            from next_gen_permissions next_gen inner join  capabilities cap on cap.id= next_gen.capability_id

            inner join projects project on next_gen.authorizable_id = project.id

            inner join users users on users.id = next_gen.grantee_id

            inner join system_users susers on susers.id = users.system_user_id

            where next_gen.authorizable_type = 'Project' and next_gen.grantee_type = 'User' and next_gen.permission =3   and cap.display_name in ( 'Project Leader')

            union all

            select distinct 

            project.name as "project_name",

            susers.name as "user_name"

            from next_gen_permissions next_gen inner join  capabilities cap on cap.id= next_gen.capability_id

            inner join projects project on next_gen.authorizable_id = project.id

            inner join groups g on g.id = next_gen.grantee_id

            inner join group_users gu on g.id = gu.group_id 

            inner join users users on users.id = gu.user_id

            inner join system_users susers on susers.id = users.system_user_id

            where next_gen.authorizable_type = 'Project' and next_gen.grantee_type = 'Group' and next_gen.permission =1  and cap.display_name in ( 'Project Leader')

            2 of 2 people found this helpful
            • 3. Re: List all project leaders in the Tableau Server
              Santhosh Sekar

              You are awesome! Thank you.

              Do we have a way to get the user existing role as well from the above query result?

              • 4. Re: List all project leaders in the Tableau Server
                arvindgarg

                user existing role  ???

                 

                What do you mean why this. Example please.

                 

                Every tableua server information is availabe in postgre database. We just need to know, how to find it.

                • 5. Re: List all project leaders in the Tableau Server
                  Santhosh Sekar

                  Hi Arvind,

                   

                  I got the information by modifying the query like below. Anyways thanks for your help.

                   

                  select * from
                  (select distinct
                  project.name as "project_name",

                  susers.name as "user_name",

                  users.site_id as "site_id",

                  sites.name as "SiteName",

                  sroles.name as "RoleName"
                  from next_gen_permissions next_gen inner join  capabilities cap on cap.id= next_gen.capability_id

                  inner join projects project on next_gen.authorizable_id = project.id

                  inner join users users on users.id = next_gen.grantee_id

                  inner join system_users susers on susers.id = users.system_user_id

                  inner join site_roles sroles on sroles.id = users.site_role_id

                  inner join sites sites on sites.id = users.site_id

                  where next_gen.authorizable_type = 'Project' and next_gen.grantee_type = 'User' and next_gen.permission =and cap.display_name in ( 'Project Leader')

                  union all
                  select distinct
                  project.name as "project_name",

                  susers.name as "user_name",

                  users.site_id as "site_id",

                  sites.name as "SiteName",

                  sroles.name as "RoleName"
                  from next_gen_permissions next_gen inner join  capabilities cap on cap.id= next_gen.capability_id

                  inner join projects project on next_gen.authorizable_id = project.id

                  inner join groups g on g.id = next_gen.grantee_id

                  inner join group_users gu on g.id = gu.group_id

                  inner join users users on users.id = gu.user_id

                  inner join system_users susers on susers.id = users.system_user_id

                  inner join site_roles sroles on sroles.id = users.site_role_id

                  inner join sites sites on sites.id = users.site_id

                  where next_gen.authorizable_type = 'Project' and next_gen.grantee_type = 'Group'
                  and next_gen.permission =and cap.display_name in ( 'Project Leader')) as A

                  where "RoleName" = 'Interactor'