Transfer ownership of Databricks SQL objects

This article shows how to transfer ownership of a dashboard, query, or alert using the UI or Permissions REST API.

Transfer ownership using the UI

  1. Login to your Databricks SQL workspace as an Administrator.

  2. Select the asset you wish to transfer ownership of.

  3. Click on the “Share” button in the top right corner.

  4. In the share modal, click on the gear icon and click “Assign new owner”.

    Assign new owner

  5. In the next modal, select the user you wish to assign ownership to and click “Confirm”.

  6. The asset has now been assigned to a new owner.

Transfer ownership using Permissions Rest API

Requirements

Important

To access Databricks REST APIs, you must authenticate.

Transfer ownership of a dashboard

curl --request POST \
  --url https://<base-url>/api/2.0/preview/sql/permissions/dashboard/<dashboard-uid>/transfer \
  --header 'Authorization: Bearer <api-key>' \
  --data '{"new_owner": "<new-owner-email>"}'

Replace the placeholders as follows:

  • <base-url>: the URL of your workspace
  • <dashboard-uuid>: the unique ID of the dashboard. To find the dashboard’s ID, open the dashboard and copy the value after /dashboards/ and before o=.
  • <new-owner-email>: the email address of the new owner
  • <api-key>: your personal access token

Transfer ownership of a query

curl --request POST \
  --url https://<base-url>/api/2.0/preview/sql/permissions/query/<query-uid>/transfer \
  --header 'Authorization: Bearer <api-key>' \
  --data '{"new_owner": "<new-owner-email>"}'

Replace the placeholders as follows:

  • <base-url>: the URL of your workspace
  • <query-uuid>: the unique ID of the dashboard. To find the query’s ID, open the query in the SQL editor and copy the value after /queries/ and before o=.
  • <new-owner-email>: the email address of the new owner
  • <api-key>: your personal access token

Transfer ownership of an alert

curl --request POST \
  --url https://<base-url>/api/2.0/preview/sql/permissions/alert/<alert-uid>/transfer \
  --header 'Authorization: Bearer <api-key>' \
  --data '{"new_owner": "<new-owner-email>"}'

Replace the placeholders as follows:

  • <base-url>: the URL of your workspace
  • <alert-uuid>: the unique ID of the dashboard. To find the alert’s ID, open the alert and copy the value after /alerts/ and before o=.
  • <new-owner-email>: the email address of the new owner. The new owner must be an administrator.
  • <api-key>: your personal access token