You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
403141: Forbidden when assigning a new owner to a datasource in 2022.1 #1072
File "fix_users.py", line 264, in <module>
updated_datasource = server.datasources.update(datasource)
File "/usr/local/lib/python3.8/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 186, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/tableauserverclient/server/endpoint/datasources_endpoint.py", line 184, in update
server_response = self.put_request(url, update_req)
File "/usr/local/lib/python3.8/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 133, in put_request
return self._make_request(
File "/usr/local/lib/python3.8/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 66, in _make_request
self._check_status(server_response)
File "/usr/local/lib/python3.8/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 82, in _check_status
raise ServerResponseError.from_response(server_response.content, self.parent_srv.namespace)
tableauserverclient.server.endpoint.exceptions.ServerResponseError:
403141: Forbidden
'userx' isn't authorized to update the datasource 'xyz'.
Thanks @ashterenberg-paramount - I think have an idea of what's happening. Could you tell me what the value of
tableau_server_api_version is in your program?
I’ll save you some precious time.
In versions of the rest api lower than 3.15 you need to pass the project id of the datasource id along with the new owner id in the put call updating the datasource.
This was confirmed (reluctantly) by Tableau support via a support case.
They promised to update the documentation but no idea when it will happen.
Activity
ashterenberg-paramount commentedon Jul 22, 2022
Here's the code that works - same credentials, same ds and user luid, but going directly against the rest api using requests.
jacalata commentedon Sep 2, 2022
Thanks @ashterenberg-paramount - I think have an idea of what's happening. Could you tell me what the value of
tableau_server_api_version is in your program?
ashterenberg-paramount commentedon Sep 2, 2022
I’ll save you some precious time.
In versions of the rest api lower than 3.15 you need to pass the project id of the datasource id along with the new owner id in the put call updating the datasource.
This was confirmed (reluctantly) by Tableau support via a support case.
They promised to update the documentation but no idea when it will happen.
ashterenberg-paramount commentedon Oct 11, 2022
mustiem commentedon Feb 24, 2023
Have tried both 3.16 and 3.17 API versions and the exact same issue.
Update datasources_endpoint.py
Update datasources_endpoint.py
Fix bug in update-datasources before 3.15 (#1203)
Push code for 0.25 with custom views (#1206)
Push code for 0.25 with custom views (tableau#1206)