Hi all.
I am new on Python and and I wrote a code which is comparing the Site users between 2 servers (Prod and DEV) for validation purposes.
What I would like to know is: How to get ALL users from a Site and from a Project, as the GUI list?
My issue is after collecting the users source_server.users.get(), it is not reporting ALL the site users as I can see in the GUI.
I did identified that Server Administrators are not returning with this Site specific function, but there is also Viewer or Explorer only members that are missing in the API list.
May it be because these users does exist in multiple Sites?
with target_server.auth.sign_in(target_tableau_auth):
target_all_sites, pagination_item = target_server.sites.get()
for source_site in source_all_sites:
source_tableau_auth.site_id = source_site.content_url
with source_server.auth.sign_in(source_tableau_auth): ⌗Connect to Source Site
print("\nConnected to Source '{0}' Site on {1} Server".format(source_tableau_auth.site_id, source_server.server_address))
source_all_users, pagination_item = source_server.users.get() #Get User list from Source Site
Thanks @Keshia Rose (Inactive)​
There is the point I don't understand:
This specific user Alexander is not listed in the Data Analytics Site, but when I check for users on All Sites, the user is listed as a Viewer for Data Analytics Site.
In this case, the server.sites.get() is able to retrieve the user, but I can't see it on the GUI.
When I created this topic I had the opposite situation. The API was not able to retrieve the user, related to the Site.
