Sub topic 8
Account, workspace and metastore administrators
Unity Catalog has three administrative roles. Each one works at a different level. Knowing which role can do what tells you who to ask when a request is blocked, and how to hand out power safely. This chapter assumes you have read the earlier chapters on the object hierarchy, principals, privileges and ownership.
Three scopes, three roles
Administrative power in Databricks is split by scope.
- The account is the top-level container for your organization. It holds all workspaces, metastores and identities.
- A workspace is one Databricks environment where people run notebooks, jobs and queries.
- A metastore is the Unity Catalog container for catalogs, schemas and other securable objects. It is attached to one or more workspaces.
Each scope has its own administrator role. The roles overlap in places, but none of them is a superset of the others.
| Role | Scope | Main responsibilities |
|---|---|---|
| Account admin | Whole account | Creates metastores, attaches them to workspaces, manages users, service principals and groups, assigns other admins |
| Metastore admin | One metastore | Manages objects and privileges inside the metastore, such as catalogs, storage credentials and external locations |
| Workspace admin | One workspace | Manages workspace users, compute, jobs and settings |
Account admins
An account admin works in the account console. Account admins can:
- Create metastores and attach them to workspaces.
- Create and manage users, service principals and groups for the whole account.
- Add principals to workspaces and assign workspace admins.
- Grant the account admin role to other principals.
- Assign or change the metastore admin of a metastore.
Account admins do not automatically get read access to your tables. Data access in Unity Catalog comes from privileges and ownership. However, an account admin can assign the metastore admin role to themselves, and a metastore admin can grant privileges on any object. In practice, an account admin can give themselves access, so treat the role as highly sensitive.
Keep the number of account admins small. Two or three named people, plus a break-glass arrangement documented by your security team, is usual. Use individual accounts, not shared logins, so that audit logs show who acted.
Metastore admins
The metastore admin is the role that operates inside Unity Catalog. A metastore admin can:
- Create catalogs.
- Create storage credentials and external locations.
- Manage privileges on objects in the metastore, including transferring ownership.
- Create connections, shares and recipients for federation and Delta Sharing.
The metastore admin role is optional. Metastores that Databricks creates automatically when you enable Unity Catalog may start without one, so check your own metastore instead of assuming. You can leave the role unassigned and delegate each task through specific privileges instead. That is often the safer choice.
Assign the role to a group
If you do use a metastore admin, assign a group, not one person. If the individual leaves or is unavailable, the group still works, and membership changes are easy to audit.
Account admins set this in the account console, on the metastore's configuration page. The field is the metastore admin. There is no SQL statement for changing it.
Delegate with privileges instead
Many metastore-level tasks can be handed out as privileges on the metastore. This lets a team do one job without holding full metastore admin power.
GRANT CREATE CATALOG ON METASTORE TO `platform-team`;
GRANT CREATE STORAGE CREDENTIAL ON METASTORE TO `cloud-admins`;
GRANT CREATE EXTERNAL LOCATION ON METASTORE TO `cloud-admins`;You can check what has been granted at the metastore level:
SHOW GRANTS ON METASTORE;A principal who creates a catalog becomes its owner. That owner can then manage the catalog's contents without any metastore-wide role. This is the pattern to aim for. The metastore admin, or better, a CREATE CATALOG grant, creates the catalog. Ownership is then transferred to a group for that business area.
ALTER CATALOG finance OWNER TO `finance-data-owners`;Workspace admins
A workspace admin is a member of the workspace's built-in admins group. The role covers the workspace, not the metastore. Workspace admins can:
- Add and remove users, service principals and groups in the workspace.
- Create and manage compute, such as clusters and SQL warehouses, and set compute policies.
- Manage jobs, workspace settings, and access control on workspace objects such as notebooks and folders.
- Manage workspace-level tokens and integrations.
Being a workspace admin gives no privilege on catalogs, schemas or tables. A workspace admin sees only the data they have been granted or own. The role matters for Unity Catalog in two indirect ways:
- Compute choice. Workspace admins decide which compute is available. Compute with the wrong access mode can weaken enforcement, as a later chapter on compute access explains.
- Ownership of what they create. If a workspace admin creates a schema or table, they own it like any other creator.
Workspace admins also control who can enter the workspace at all. A user who is not added to the workspace cannot use its compute, even if they have privileges on the data.
How the roles combine
Consider a request: "Create a new catalog for the finance team, and let them read a bucket of raw files."
| Step | Who can do it |
|---|---|
| Make the finance group exist in the account | Account admin |
| Add the group to the workspace | Account admin or workspace admin |
| Create the catalog | Metastore admin, or a principal with `CREATE CATALOG` |
| Create the external location for the bucket | Metastore admin, or a principal with `CREATE EXTERNAL LOCATION` and rights on the storage credential |
| Give the group access to compute | Workspace admin |
No single role covers every row. That is by design. It lets you separate duties between identity management, data governance and workspace operations.
Separation of duties in practice
A common layout looks like this:
- A small
account-adminsset of named individuals handles identity and metastore setup. - A
uc-adminsgroup is the metastore admin, or is left out altogether in favor of narrow grants. - Each workspace has its own admins, chosen by the team that runs it.
- Business teams own catalogs through ownership transfer to a group.
The following statements implement the delegation part. They assume the groups already exist in the account.
GRANT CREATE CATALOG ON METASTORE TO `platform-team`;
-- After the platform team creates the catalog, hand it over.
ALTER CATALOG marketing OWNER TO `marketing-data-owners`;
-- The owning group can now delegate inside its own catalog.
GRANT USE CATALOG, CREATE SCHEMA ON CATALOG marketing TO `marketing-engineers`;The platform team no longer needs to be involved when marketing adds schemas. Marketing's group owns the catalog and manages its own grants.
Common errors
- Using one broad admin role for everything. A single group that is account admin, metastore admin and workspace admin removes any separation of duties and enlarges the damage from one compromised account.
- Assigning the metastore admin to an individual. When that person leaves, tasks stall and ownership may be orphaned.
- Expecting workspace admin to mean data access. A workspace admin who gets "permission denied" on a table needs a grant like anyone else.
- Assuming account admin means data access. It does not on its own. Look at who owns the object or who holds the grant.
- Making admins owners of everything. If admins create all objects, they own them all, and every access change goes through them. Transfer ownership to groups.
- Looking for SQL to set admin roles. Account and metastore admin assignments are made in the account console or through account APIs. Workspace admin membership is managed in workspace settings or the admins group.
You can check your own situation from a notebook or the SQL editor. SHOW GRANTS on the metastore shows delegated privileges, and the audit log shows who made administrative changes.
SELECT event_time, user_identity.email, action_name
FROM system.access.audit
WHERE service_name = 'unityCatalog'
ORDER BY event_time DESC
LIMIT 20;Exercise
A data engineer is a workspace admin and gets "permission denied" when reading main.sales.orders. Which role should they ask to fix this, and what is the narrowest fix?
Show answer
Workspace admin does not carry data privileges. They should ask the owner of the table, or a metastore admin, to grant access. The narrowest fix is to grant the engineer's group USE CATALOG on main, USE SCHEMA on main.sales, and SELECT on main.sales.orders. Making them a metastore admin would work but gives far more power than needed.
Exercise
Your team wants the platform group to create catalogs, but you do not want them to manage every catalog's grants afterwards. How do you set this up?
Show answer
Grant CREATE CATALOG on the metastore to the platform group. After a catalog is created, transfer its ownership to the business team's group with ALTER CATALOG ... OWNER TO. The business group then manages grants inside its catalog, and the platform group does not hold standing control over it.