divinorum-webb / tableau-api-lib

An API library that allows developers to call on the methods listed in Tableau's REST API documentation.
MIT License
96 stars 34 forks source link

Error when running update_group for ActiveDirectory group #66

Closed harrismcgehee closed 2 years ago

harrismcgehee commented 2 years ago

Many thanks for the package!

I'm having trouble refreshing an AD group. https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_users_and_groups.htm#update_group

conn.update_group(group_id = "<id>",
                             active_directory_group_name = "ActiveDirectory",
                             active_directory_domain_name = "<domain>",
                             default_site_role = "ExplorerCanPublish",
                             parameter_dict = list("param" = "asJob=true")
                             )

"{\"error\":{\"summary\":\"Bad Request\",\"detail\":\"errors.bad_request.detail.invalid_grant_license_mode\",\"code\":\"400125\"}}"

I get this response, but I can't find where it is coming from.

The active_request appears to be malformed. I have to pass in active_directory_group_name as "ActiveDirectory" in order to not get this response: "{\"error\":{\"summary\":\"Bad Request\",\"detail\":\"Malformed 'import' element in the request payload.\",\"code\":\"400019\"}}"

grantLicenseMode or any version thereof doesn't appear to be in the parameters for update_group.

I apologize if I missed something in the docs.

divinorum-webb commented 2 years ago

Hey @harrismcgehee thanks for calling this out, it was indeed an evolution in the REST API that the library had not caught up with. If you run pip install -U tableau-api-lib you will have the latest version of the library.