tableau / server-client-python

A Python library for the Tableau Server REST API
https://tableau.github.io/server-client-python/
MIT License
656 stars 420 forks source link

cannot query job status when authenticated with JWT #1320

Open ACronje opened 10 months ago

ACronje commented 10 months ago

Describe the bug Authenticating with JWT I am not able to lookup the status of a job - instead I get a "unauthorized access error". I believe the jobs endpoint is not supported with JWT auth as I don't see a scope for it on this page. This seems strange to me since if I am able to able to kickoff a datasource refresh job and get back it's job ID, I would expect to also be able to lookup the status of that job.

Using a PAT I am able to lookup the job, but we would like to use Connected Apps for our specific use case.

Versions Details of your environment, including:

To Reproduce

tableau_auth = tsc.JWTAuth(jwt_token, site_id=site_id)
server = tsc.Server(server_url, use_server_version=True)
server.auth.sign_in(tableau_auth)
job_details = server.datasources.refresh(my_datasource_id)
server.jobs.get_by_id(job_id=job_details.id)

Results I get a 401002 error code

jacalata commented 8 months ago

You are correct, this is a bug on the server where this endpoint has not got the correct permissions set. I do not currently have any info about an expected fix.

podewitz commented 5 months ago

Hi,

are there any updates on this? We would also very much appreciate the possibility of querying the job api with JWT authentication.

jacalata commented 3 months ago

Sorry, I don't have any updates.