---
title: Create data recipients for OpenSharing (Databricks-to-Databricks sharing)
description: Learn how to use Databricks to create OpenSharing recipients who are on other Databricks workspaces.
canonical_url: https://docs.databricks.com/aws/en/opensharing/create-recipient
---

# Create data recipients for OpenSharing (Databricks-to-Databricks sharing)

This page explains how to create recipients in OpenSharing, when the recipients are on a Databricks workspace that is enabled for [Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/index.md). To view, update, delete, grant share access, manage properties, or restrict access with IP lists for an existing recipient, see [Manage data recipients for OpenSharing](https://docs.databricks.com/aws/en/opensharing/manage-recipients.md).

A recipient is the named object that represents the identity of a user or group of users who consume shared data. The way you create recipients differs depending on whether or not your recipient has access to a Databricks workspace that is enabled for Unity Catalog:

* Recipients with access to a Unity Catalog-enabled Databricks workspace:

  You can create a recipient object with a secure connection managed by Databricks. This sharing mode is called *Databricks-to-Databricks sharing*, and it is documented in this page.

* Recipients without access to a Unity Catalog-enabled Databricks workspace:

  You must use *open sharing*, with a secure connection that you manage using token-based authentication (either bearer tokens or OAuth federation). For information about creating Databricks-to-Open sharing recipients, see [Enable Open ID Connect (OIDC) federation for OpenSharing recipients](https://docs.databricks.com/aws/en/opensharing/create-recipient-oidc-fed.md) or [Create a recipient object for non-Databricks users using bearer tokens (Databricks-to-Open sharing)](https://docs.databricks.com/aws/en/opensharing/create-recipient-token.md).

For more information about these two sharing modes and when to choose which, see [Databricks-to-Open sharing versus Databricks-to-Databricks sharing](https://docs.databricks.com/aws/en/opensharing/index.md#open-vs-d-to-d).

## Requirements

To create a recipient:

* You must have the `CREATE RECIPIENT` privilege for the Unity Catalog metastore where the data you want to share is registered.
* You must create the recipient using a Databricks workspace that has that Unity Catalog metastore attached.
* If you use a Databricks notebook to create the recipient, your compute must use Databricks Runtime 11.3 LTS or above and either standard or dedicated access mode (formerly shared and single user access modes).

For permissions required for other recipient operations (view, update, delete, grant share access, manage properties), see [Manage data recipients for OpenSharing](https://docs.databricks.com/aws/en/opensharing/manage-recipients.md).

## <a id="db-to-db" /><a id="create-recipient-db-to-db" />Create a recipient object for Databricks users

If your data recipient has access to a Databricks workspace that has been [enabled for Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/enable-workspaces.md), you can create a recipient object with an authentication type of `DATABRICKS`.

A recipient object with the authentication type of `DATABRICKS` represents a data recipient on a particular Unity Catalog metastore, identified in the recipient object definition by a *sharing identifier* string consisting of the metastore's cloud, region, and UUID. The data shared with this recipient can be accessed only on that metastore.

To create a recipient for Databricks-to-Databricks sharing, use the Catalog Explorer, the Databricks CLI, or the `CREATE RECIPIENT` SQL command in a Databricks notebook or the Databricks SQL query editor. To create a recipient with the REST API, including an email recipient, see [Create a recipient](https://docs.databricks.com/api/workspace/recipients/create) in the REST API reference.

**Permissions required**: Metastore admin or user with the `CREATE RECIPIENT` privilege for the Unity Catalog metastore where the data you want to share is registered.

### Catalog Explorer

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog**.

2. At the top of the **Catalog** pane, click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon and select **OpenSharing**.

   Alternatively, in the upper-right corner, click **Share > OpenSharing**.

3. On the **Shared by me** tab, click **New recipient**.

4. Choose how your recipient can access their shares:
   * **Share using email** (Beta): This sends an email to the recipient, prompting them to log in to their Databricks account and select the desired metastore. The recipient must sign in with a Databricks account that uses the invited email address. For more information and limitations, see [email sharing](https://docs.databricks.com/aws/en/opensharing/index.md#email-sharing).

     1. Enter the **Recipient name**.
     2. Enter the recipient's email address.
     3. For **Configure how this share can be consumed**, select **Any supported OpenSharing client** or **Limit to Databricks recipients**. **Any supported OpenSharing client** allows your recipient to download a credential file and access the share on Databricks.
     4. (Optional) Under **Allowed metastores (via sharing ID)**, click **Add metastore** and enter a sharing identifier to limit which Databricks metastores can accept the invitation.

     > [!NOTE]
     >
     > When you add a recipient to a share, OpenSharing emails the recipient a secure activation link, and sends a new email each time you add them to another share. Re-granting a share that a recipient already has doesn't trigger a duplicate email. See [Manage access to OpenSharing data shares (for providers)](https://docs.databricks.com/aws/en/opensharing/grant-access.md).

   * **Share using sharing identifier**: You need to ask for and input the recipient's sharing identifier.
     1. Enter the **Recipient name**.

     2. For **Recipient type**, select **Databricks**.

     3. Enter the recipient's **Sharing identifier**.

        Use the entire sharing identifier string in the format `<cloud>:<region>:<uuid>`. For example, `aws:us-west-2:19a84bee-54bc-43a2-87de-023d0ec16016`.

     4. (Optional) Enter a comment.

5. Click **Create**.

6. (Optional) Create custom **Recipient properties**.

   On the recipient **Overview** tab, click the ![Edit icon](https://docs.databricks.com/aws/en/images/icons/pencil-edit-icon.png) edit icon next to **Recipient properties**. Then add a property name (**Key**) and **Value**. For details, see [Manage recipient properties](https://docs.databricks.com/aws/en/opensharing/manage-recipients.md#properties).

### SQL

Run the following command in a notebook or the Databricks SQL query editor:

```sql
CREATE RECIPIENT [IF NOT EXISTS] <recipient-name>
USING ID '<sharing-identifier>'
[COMMENT "<comment>"];
```

Use the entire sharing identifier string in the format `<cloud>:<region>:<uuid>`. For example, `aws:eu-west-1:g0c979c8-3e68-4cdf-94af-d05c120ed1ef`.

You can also add custom properties for the recipient. For details, see [Manage recipient properties](https://docs.databricks.com/aws/en/opensharing/manage-recipients.md#properties).

### CLI

Run the following command using the [Databricks CLI](https://docs.databricks.com/aws/en/dev-tools/cli/index.md). Replace the placeholder values:

* `<recipient-name>`: The name of the recipient.
* `<sharing-identifier>`: The entire sharing identifier string in the format `<cloud>:<region>:<uuid>`. For example, `aws:eu-west-1:g0c979c8-3e68-4cdf-94af-d05c120ed1ef`.
* `<authentication-type>`: Set to `DATABRICKS` when a sharing identifier string in the format `<cloud>:<region>:<uuid>` is provided for `<sharing-identifier>`.

```bash
databricks recipients create <recipient-name> <authentication-type> --sharing-code <sharing-identifier>
```

You can also add custom properties for the recipient. For details, see [Manage recipient properties](https://docs.databricks.com/aws/en/opensharing/manage-recipients.md#properties).

The recipient is created with the `authentication_type` of `DATABRICKS`.

## <a id="additional-resources" /> Additional resources

* [Manage access to OpenSharing data shares (for providers)](https://docs.databricks.com/aws/en/opensharing/grant-access.md) — Grant the recipient access to one or more shares.
* [Manage data recipients for OpenSharing](https://docs.databricks.com/aws/en/opensharing/manage-recipients.md) — View, update, delete, manage properties, or restrict access for an existing recipient.
* [Create shares for OpenSharing](https://docs.databricks.com/aws/en/opensharing/create-share.md) — Create the shares you want to grant the recipient access to.
