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: 

Unable to grant catalog access to service principal

Kasen
New Contributor III

Kasen_0-1715058248230.png

Kasen_1-1715058284642.png

Hi everyone,

I created a service principals called TestServicePrincipal. I tried to grant the catalog access to the service principals, but the error mentioned that it could not find principal with name TestServicePrincipal. If I grant the access to specific user by replacing `TestServicePrincipal` to `user1@mycompany.com`, then it works fine. May I know what is the reason that I can't grant the catalog access to the service principals that I created? By right I should be able to do so by following the documentation below:

https://docs.databricks.com/en/sql/language-manual/security-grant.html

Any help or advise will be greatly appreciated, thank you.

 

 

 

2 REPLIES 2

dtilen
New Contributor II

Instead of referring to the service principal by its display name, use it's application_id.

It isn't overtly stated in the documentation you shared, but you can see it in the example portion.

-- Granting a privilege to the service principal fab9e00e-ca35-11ec-9d64-0242ac120002
> GRANT SELECT ON TABLE t TO `fab9e00e-ca35-11ec-9d64-0242ac120002`;

 

 

OYESPEEDY
New Contributor II

The issue could be related to how the service principal is being resolved in your system. Unlike users, service principals are often registered in a directory (like Azure AD), and their names might not match what you’re using. Instead of using TestServicePrincipal as the name, try referencing the service principal's Object ID, App ID, or the exact display name as registered in your directory.

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