Databricks-restrict access to users for data

Sarah C Benjamin 6 Reputation points
2021-05-25T21:24:27.153+00:00

Hi

I worked on creating a new cluster (ClusterA) and added a few users (UserA, B) to my workspace. I am the admin and have created a database and a few tables under ClusterA.
Now I need to add UserA to see the tables but not userB

I enabled table access control for my workspace following this url.
https://learn.microsoft.com/en-us/azure/databricks/administration-guide/access-control/table-acl#--enable-table-access-control-for-your-workspace

and configure cluster-level permissions by giving "Can attach to" permissions to only userA on cluster A
https://learn.microsoft.com/en-us/azure/databricks/security/access-control/cluster-acl#configure-cluster-level-permissions

When userA goes to Data tab, he can see the clusterA but not the database and tables underneath.

What do I need to do to give userA visibility to data and tables?
99539-image.png

I tried running the following query on my notebook
SHOW GRANT userA ON DATABASE customer_db

but I got a message saying Query returned no results, I dont know what does that mean, did it work or no?

99623-image.png

Also I tried giving access like this
GRANT USAGE ON DATABASE customer_db TO UserA;
GRANT SELECT ON DATABASE customer_db TO UserA

but still the screen looks like this
99530-image.png

Not sure what am I missing?

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha 19,527 Reputation points Microsoft Employee Moderator
    2021-05-27T23:03:48.967+00:00

    Hello @Sarah C Benjamin ,
    Apologizes for the late reply .
    I did tried to repro this on my side . But when i tried to give access to the user , it through an error , but then if I create user group and then give access it works .

    GRANT SELECT ON DATABASE test1 To usergroup1
    SHOW GRANT usergroup1 ON DATABASE test1

    100352-image.png
    Please do let me know how it goes .
    Thanks
    Himanshu
    Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.