Skip to main content

Manage privileges in Unity Catalog

This page explains how to grant, revoke, and inspect privileges on Unity Catalog securable objects, and how to manage object ownership. For conceptual background on the permissions model, privilege inheritance, and ownership, see Unity Catalog permissions model concepts.

Who can manage privileges?

Initially, users have no access to data in a metastore. Databricks account admins, workspace admins, and metastore admins have default privileges for managing Unity Catalog. See Admin privileges in Unity Catalog.

All securable objects in Unity Catalog have an owner. Object owners have all privileges on that object, including the ability to grant privileges to other principals. Owners can grant other users the MANAGE privilege on the object, which allows users to manage privileges on the object. See Manage object ownership.

Privileges can be granted by any of the following:

  • The owner of the object.
  • The owner of the catalog or schema that contains the object.
  • A user with the MANAGE privilege on the object.
  • A metastore admin.

Account admins can also grant privileges directly on a metastore.

Workspace catalog privileges

If your workspace was enabled for Unity Catalog automatically, the workspace is attached to a metastore by default and a workspace catalog is created for your workspace in the metastore. Workspace admins are the default owners of the workspace catalog. As owners, they can manage privileges on the workspace catalog and all child objects.

All workspace users receive the USE CATALOG privilege on the workspace catalog. Workspace users also receive the USE SCHEMA, CREATE TABLE, CREATE VOLUME, CREATE MODEL, CREATE FUNCTION, and CREATE MATERIALIZED VIEW privileges on the default schema in the catalog.

For more information, see Automatic enablement of Unity Catalog.

Show, grant, and revoke privileges

You can manage privileges for metastore objects using SQL commands, the Databricks CLI, the Databricks Terraform provider, or Catalog Explorer.

In the SQL commands that follow, replace these placeholder values:

  • <privilege-type> is a Unity Catalog privilege type. See Privilege types.
  • <securable-type>: The type of securable object, such as CATALOG or TABLE. See Securable objects
  • <securable-name>: The name of the securable. If the securable type is METASTORE, do not provide the securable name. It is assumed to be the metastore attached to the workspace.
  • <principal> is a user, service principal (represented by its applicationId value), or group. You must enclose users, service principals, and group names that include special characters in backticks (` `). See Principal.

Show grants on an object

note

Currently, users with the MANAGE privilege on an object cannot view all grants for that object in the INFORMATION_SCHEMA. Instead, the INFORMATION_SCHEMA only shows grants their own grants on the object. This behavior will be corrected in the future.

Users with MANAGE privilege can view all grants on an object using SQL commands or Catalog Explorer. See Manage privileges in Unity Catalog.

Permissions required:

  • Metastore admins, users with the MANAGE privilege on the object, the owner of the object, or the owner of the catalog or schema that contains the object can see all grants on the object.
  • If you do not have the above permissions, you can view only your own grants on the object.
  1. In your Databricks workspace, click Data icon. Catalog.
  2. Select the object, such as a catalog, schema, table, or view.
  3. Go to the Permissions tab.

Show my grants on an object

Permissions required: You can always view your own grants on an object.

  1. In your Databricks workspace, click Data icon. Catalog.
  2. Select the object, such as a catalog, schema, table, or view.
  3. Go to the Permissions tab. If you are not an object owner or metastore admin, you can view only your own grants on the object.

Grant permissions on an object

Permissions required: Metastore admin, the MANAGE privilege on the object, the owner of the object, or the owner of the catalog or schema that contains the object.

  1. In your Databricks workspace, click Data icon. Catalog.
  2. Select the object, such as a catalog, schema, table, or view.
  3. Go to the Permissions tab.
  4. Click Grant.
  5. Enter the email address for a user or the name of a group.
  6. Select the permissions to grant.
  7. Click OK.

Revoke permissions on an object

Permissions required: Metastore admin, the MANAGE privilege on the object, the owner of the object, or the owner of the catalog or schema that contains the object.

  1. In your Databricks workspace, click Data icon. Catalog.
  2. Select the object, such as a catalog, schema, table, or view.
  3. Go to the Permissions tab.
  4. Select a privilege that has been granted to a user, service principal, or group.
  5. Click Revoke.
  6. To confirm, click Revoke.

Show grants on a metastore

Permissions required: Metastore admin or account admin. You can also view your own grants on a metastore.

  1. In your Databricks workspace, click Data icon. Catalog.
  2. At the top of the Catalog pane, click the Gear icon. gear icon and select Metastore.
  3. Click the Permissions tab.

Grant permissions on a metastore

Permissions required: Metastore admin or account admin.

  1. In your Databricks workspace, click Data icon. Catalog.
  2. At the top of the Catalog pane, click the Gear icon. gear icon and select Metastore.
  3. On the Permissions tab, click Grant.
  4. Enter the email address for a user or the name of a group.
  5. Select the permissions to grant.
  6. Click OK.

Revoke permissions on a metastore

Permissions required: Metastore admin or account admin.

  1. In your Databricks workspace, click Data icon. Catalog.
  2. At the top of the Catalog pane, click the Gear icon. gear icon and select Metastore.
  3. On the Permissions tab, select a user or group and click Revoke.
  4. To confirm, click Revoke.

Manage object ownership

View an object's owner

You can use Catalog Explorer or SQL statements to view an object's owner.

Permissions required: Any user with the BROWSE privilege on the object or a parent of the object can view the object owner.

  1. In your Databricks workspace, click Data icon. Catalog.

  2. Select the object, such as a catalog, schema, table, view, volume, external location, or storage credential.

    How to navigate to the object depends on the object. Catalogs, schemas, and the contents of schemas (such as tables and volumes) are selectable in the left Catalog pane. You can find other objects, such as external locations or Delta Sharing shares, by clicking the Gear icon. gear icon above the Catalog pane and selecting the object category from the menu.

    For most objects, the owner is displayed on the Overview tab on the object details page. For some objects, such as external locations, it is displayed at the top of the object details page.

Transfer ownership

You can use Catalog Explorer or SQL statements to transfer an object's owner.

Permissions required: You can transfer object ownership if you are the current owner, a metastore admin, the owner of the container (the catalog for a schema, the schema for a table), or a user with the MANAGE privilege on the object. Delta Sharing share objects are an exception: only a metastore admin can transfer share ownership.

To prevent privilege escalations, only a metastore admin can transfer ownership of a view, function, or model to any user, service principal, or group in the account. Current owners and users with the MANAGE privilege are restricted to transferring ownership to their username or to a group that they are member of.

tip

Transferring ownership of a view or metric view to a group enables collaborative editing. When a group owns a view or metric view, all group members can edit its definition while data access remains limited to what the group has permission to see. For detailed guidance, see Enable collaborative editing.

note

Materialized views and streaming tables created with Databricks SQL can have ownership transferred. For details see Change the owner of a materialized view and Change the owner of a streaming table.

Materialized views and streaming tables created with Lakeflow Spark Declarative Pipelines can't have their ownership directly transferred. Instead, change the run-as user of the pipeline that owns the datasets. With the next refresh, the owner will be updated to the run-as user. See Set the run-as user.

  1. In your Databricks workspace, click Data icon. Catalog.

  2. Select the object, such as a catalog, schema, table, view, external location, or storage credential.

    How to navigate to the object depends on the object. Catalogs, schemas, and the contents of schemas (such as tables and volumes) are selectable in the left Catalog pane. You can find other objects, such as external locations or Delta Sharing shares, by clicking the Gear icon. gear icon above the Catalog pane and selecting the object category from the menu.

    For most objects, the owner is displayed on the Overview tab on the object details page. For some objects, such as external locations, it is displayed at the top of the object details page.

  3. Click the Edit icon edit icon next to the Owner.

  4. Search for and select a group, user, or service principal.

  5. Click Save.