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

403141: Forbidden 'server administrator' isn't authorized to update the datasource. #1313

Open yaphx opened 10 months ago

yaphx commented 10 months ago

Describe the bug I am using a server administrator account to perform all these updates/moving. However, I am unable to move data sources programmatically from one project to another project within the same site. But I am able to move workbooks.

Versions Environment Details, including:

To Reproduce

with server.auth.sign_in(tableau_auth):
    #move workbook
    move_workbook = server.workbooks.get_by_id(workbook_id)
    move_workbook.project_id = target_project_id
    target_workbook = server.workbooks.update(move_workbook)

    #move datasource
    move_datasource = server.datasources.get_by_id(datasource_id)
    move_datasource.project_id = target_project_id
    target_datasource = server.datasources.update(move_datasource)

Results 403141: Forbidden 'server administrator' isn't authorized to update the datasource.

rickymedrano commented 7 months ago

@yaphx Just tested for TSC version 0.30 and it worked fine moving a datasource to a new project. I see you're using version 0.25 so its best to move up to 0.30.