cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete object permissions using REST API

reddybhargava
New Contributor II

We have REST API methods to set,update,Get object permissions documented here https://docs.databricks.com/api/workspace/permissions

Is there a way to revoke the permissions which are granted through REST API

2 REPLIES 2

szymon_dybczak
Esteemed Contributor III

Hi @reddybhargava ,

You're correct, there is no direct delete method in REST API. To delete/revoke permission you need to use set method.

Any previous permissions are overwritten by the new values, and any permissions omitted are removed. It's little inconvenient, but it works 😉

reddybhargava
New Contributor II

Thank you for your response!

We have a situation where we assigned CAN_BIND permissions to a group for a service principal using the following:

$ vim grant-service-principal.json
{
"access_control_list": [
{
"user_name": "{username}",
"permission_level": "CAN_BIND"
}
]
}
$ curl -X PATCH {DATABRICKS_HOST}/api/2.0/permissions/service-principals/{SP_ID}
header "Content-type: application/json" header "Authorization: Bearer
${DATABRICKS_TOKEN}" data @Grant-service-principal.json

However, the issue with using the SET method to overwrite these permissions is that, as far as we have tried, we can only assign CAN_BIND to a service principal and cannot assign other permissions like CAN_VIEW, etc.

Do you have any suggestions on how we might address this?

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now