cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Using the API, get the list of the schemas and tables a group or user has permissions for

robmcclain
New Contributor II

I am attempting to use the Databricks API to get a list of the schemas and tables a group or user has permissions for.  Is this possible?  Is there another method I should be using instead?

I see the Unity Catalog > Grants > Get permissions endpoint can list the principals that have permissions for a schema or table, but this is the inverse of what I need.

1 ACCEPTED SOLUTION

Accepted Solutions

Walter_C
Honored Contributor
Honored Contributor

To make sure I am in the correct path, you want to provide a group id for example or an user id and that the API retrieves all the objects that this user has access to? If this is the case unfortunately as of now there is no API available to collect this information as the permissions are handled by object and not by the principal

View solution in original post

2 REPLIES 2

Walter_C
Honored Contributor
Honored Contributor

To make sure I am in the correct path, you want to provide a group id for example or an user id and that the API retrieves all the objects that this user has access to? If this is the case unfortunately as of now there is no API available to collect this information as the permissions are handled by object and not by the principal

robmcclain
New Contributor II

Thanks, @Walter_C.  In my case, I was able to get the data I needed by using the Databricks SQL Driver for Node.js , querying the information_schema.table_privileges table.

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