8000 Retrieve email id of user who is logging in · Issue #871 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Retrieve email id of user who is logging in #871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pavankumartableau opened this issue Aug 3, 2021 · 1 comment
Open

Retrieve email id of user who is logging in #871

pavankumartableau opened this issue Aug 3, 2021 · 1 comment
Labels
needs investigation Issue needs to be looked at by Tableau

Comments

@pavankumartableau
Copy link

I need to retrieve mail id of users who is logging in
Tableau server version is 2020.4.5
tableauserverclient version is 0.15.0

I am using the code mentioned in #278
still i get none for fullname and email

Note: i want to retrieve mail id of the site admin who is logging in as we have multiple sites and need to send a mail to that site admin whoever logging to that particular site admin

code:
import tableauserverclient as TSC
tableau_auth = TSC.TableauAuth('USERNAME', 'PASSWORD')
server = TSC.Server('https://SERVERURL')

with server.auth.sign_in(tableau_auth):
all_users, pagination_item = server.users.get()
for user_item in all_users:
print("User name: '{}' fullname: '{}', User email: '{}'".format(user_item.name,
user_item.fullname,
user_item.email))

image

@jacalata jacalata added the needs investigation Issue needs to be looked at by Tableau label Nov 8, 2021
@jacalata
Copy link
Contributor

you need to request these fields explicitly, they are not all included in the return object by default. I'll have to look at how tsc code supports that.

Info about fields: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_fields.htm#get-users_site

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Issue needs to be looked at by Tableau
Projects
None yet
Development

No branches or pull requests

2 participants
0