SaugatMukherjee
New Contributor III

Ok, so I have been able to test this.

Basically to remove permissions, you will have to use the "Set SQL Warehouse permissions" using "PUT" and provide it the full list of people, who should have access, leaving out those, who shouldn't, like I mentioned in my reply above.

The update API, does not support it.

So, basically you have to use this endpoint: https://docs.databricks.com/api/workspace/warehouses/setpermissions  

and pass on the list of people (apart from the usual owner and admin group, because those would always be there)

who should have access.

Here are some screenshots:

Below are 3 permissions defined for the SQL warehouse , 2 of them being owner and admin, which is by default (assuming that you do not want to change the owner)

SaugatMukherjee_0-1703090637409.png

Now, I want to revoke permissions for the 3rd user (can use).

So, I do this, call the set permissions endpoint, with an empty array for accesslist (as the owner and admin are there by default and I do not want to change the owner)

SaugatMukherjee_1-1703090918922.png

Result- the permissions for the 3rd user removed:

SaugatMukherjee_2-1703090999515.png

 

In case you have permissions for user you want to keep, other than the owner and admin, provide them in the access_control_list array object, and only those would remain, removing others.

Hope this helps