3 Replies Latest reply on Mar 10, 2020 9:54 AM by Geraldine Zanolli

    Unable to log in using Python and Rest API Need help

    Zach Porcelli

      Hello All,


      I am on server version is 2019.1.


      I am new to the REST API and new to Python. I am trying to trigger a schedule with the python tableauserviceclient using the rest API but I cannot get past the Log in. Here is what i am trying to run just to test access.


      import tableauserverclient as TSC

      server = TSC.Server('https :// tableaublahblah .com')

      server.add_http_options({'verify': True})


      tableau_auth = TSC.TableauAuth("User.name","Bestpasseverfake")



      with server.auth.sign_in(tableau_auth):

          all_datasources, pagination_item = server.datasources.get()

          print("\nThere are {} datasources on site: ".format(pagination_item.total_available))

          print([datasource.name for datasource in all_datasources])


      If I run the top half I see the login under the admin account I'm using the creds for I can see the Login on the actions monitoring page for users. However if I run the whole command it errors out and says

      401001: Signin Error

      Error signing in to Tableau Server

      I have looked and i know i am using SAML but from what i understand using the username and password solves that issue. I have looked over the forums and i cannot find an answer to my problem.


      Thank you,