bryanthowell-tableau / tableau_tools

Package containing Tableau REST API, XML modification, tabcmd and repository tools
Other
215 stars 86 forks source link

Failed to update 'Server Administrator' user's SiteRole to 'Unlicensed' #67

Closed vipulkaneriya closed 4 years ago

vipulkaneriya commented 5 years ago

Getting error when I am trying to update 'Server Administrator' user's SiteRole to 'Unlicensed'. I am using Tableau 2019.1 with api version 3.3 and easily change role but not with this Tableau_Tools.

any user with SiteRole = Server Administrator throwing below error for method : t.update_user(username_or_luid=user, site_role=u'Unlicensed')

400 Client Error: Bad Request for url: https://{server.com}/api/3.3/sites/366dsdsd600cb-56fe-4ssabc-88-e99c566369f/users/dsdhtfn7-f5ad-4874-97ce-6bb68d

Is their any reason I can't set Server Administrator user role to Unlicensed? Apart from that role I can change to any role for any user with same method.

bryanthowell-tableau commented 4 years ago

I think this is a Tableau REST API limitation -- you also can't promote someone to Server Administrator via the REST API regardless of whether the user you created your REST API session is also is a Server Admin. You have to go into the UI.