cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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
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?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group