Hello I m using Data bricks, and working with https://docs.databricks.com/api/workspace/statementexecution I m using SQL Api statement with help of Azure ADAP SPN token. I m able to run all queries successfully.
I want to restrict this SPN to use only to read Data. If I Use any delete query or any query apart of read operation I don't want to allow to that SPN. I also dont want to allow that SPN to Do any DML operation or delete job or cluster or Wearhouse kind job. I just want that SPN to allow to read data. Any one have done this
You can restrict the service principal for SQL query execution at the schema
level and the table
level.
To grant such permission follow below steps:
Go To > Catalog > Select schema or table > Permissions > Grant
After clicking on "Grant," you will see the window below.
Here, search for the service principal you previously added and grant only select
permission.
This restricts the service principal to read-only access for an object.