---
schema_version: "1"
id: 30cc4ea9ed8ccbd7baaf122ede981d00c61939a47b159a7ee8b23b2429d035b1
title: OwnerSharingRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_ownersharingrule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_ownersharingrule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 51602b95ab710a17aaad9d26ec596c44d3e1a512178e2cda4e35f33545adfdbe
description: Represents an ownership-based sharing rule. OwnerSharingRule enables you to share records owned by a set of users with another set, using rules that specify the access level of the target user group. This component is removed as of API version 33.0 and is available in earlier versions only.
---
# OwnerSharingRule

Represents an ownership-based sharing rule. OwnerSharingRule enables you to share records owned by a set of users with another set, using rules that specify the access level of the target user group. This component is removed as of API version 33.0 and is available in earlier versions only.

OwnerSharingRule extends the [BaseSharingRule](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_basesharingrule.htm "This component is removed as of API version 33.0 and is available in earlier versions only. Use SharingBaseRule instead. Represents the base container for criteria-based and owner-based sharing rules.") metadata type and inherits its SharedTo field. For more information, see “Sharing Rules” in the Salesforce online help.

![Note](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note.png)

#### Note

You can’t create a OwnerSharingRule component directly. Use the child components instead.

## Declarative Metadata File Suffix and Directory Location

OwnerSharingRules components are stored within the SharingRules component in the ownerRules field.

## Version

OwnerSharingRules components are available in API version 24.0 and later.

## Special Access Rules

As of Spring ’20 and later, only users with the View Setup and Configuration permission can access this object, and only users with the Manage Sharing permission can edit this object.

## Fields

The following information assumes that you are familiar with implementing sharing rules for standard objects and custom objects. For more information on these fields, see “Sharing Settings” in the Salesforce online help.

| Field | Field Type | Description |
| --- | --- | --- |
| sharedFrom | [SharedTo](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharedto.htm "SharedTo defines the sharing access for a list view or a folder. It can be used to specify the target and source for owner-based sharing rules.") | Required. Specifies the record owners. |
| sharedTo | [SharedTo](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharedto.htm "SharedTo defines the sharing access for a list view or a folder. It can be used to specify the target and source for owner-based sharing rules.") | Required. Specifies who the record should be shared with. |
| fullName | string | The unique identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") component. |

## AccountOwnerSharingRule

Represents a sharing rule for an account with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

AccountOwnerSharingRule is used by the ownerRules field in [AccountSharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#AccountSharingRules).

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e229">Field</th>

              <th class="featureTableHeader  " id="d727668e232">Field Type</th>

              <th class="featureTableHeader  " id="d727668e235">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e229" data-title="Field"><span class="keyword parmname">accountAccessLevel</span></td>

              <td class="entry" headers="d727668e232" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoNone</samp> (enumeration of
                type string)
              </td>

              <td class="entry" headers="d727668e235" data-title="Description">Required. A value that represents the level of access that a group or role has
                to the account. The possible values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                  <li class="li"><samp class="codeph nolang">All</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e229" data-title="Field"><span class="keyword parmname">caseAccessLevel</span></td>

              <td class="entry" headers="d727668e232" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoAll</samp> (enumeration of type
                string)
              </td>

              <td class="entry" headers="d727668e235" data-title="Description">Required. A value that represents the level of access that a group or role has
                to cases associated with the account. The possible values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">None</samp></li>

                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e229" data-title="Field"><span class="keyword parmname">contactAccessLevel</span></td>

              <td class="entry" headers="d727668e232" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoAll</samp> (enumeration of type
                string)
              </td>

              <td class="entry" headers="d727668e235" data-title="Description">Required. A value that represents the level of access that a group or role has
                to contacts associated with the account. The possible values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">None</samp></li>

                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e229" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e232" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e235" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.This
                field is available in API version 29.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e229" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e232" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e235" data-title="Description">Required. Name for the sharing rule. Corresponds to
                <strong class="ph uicontrol">Label</strong> in the user interface.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e229" data-title="Field"><span class="keyword parmname">opportunityAccessLevel</span></td>

              <td class="entry" headers="d727668e232" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoAll</samp> (enumeration of type
                string)
              </td>

              <td class="entry" headers="d727668e235" data-title="Description">Required. A value that represents the level of access that a group or role is
                granted for any associated opportunity. The possible values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">None</samp></li>

                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## CampaignOwnerSharingRule

Represents a sharing rule for a campaign with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

CampaignOwnerSharingRule is used by the ownerRules field in [CampaignSharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#CampaignSharingRules).

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e433">Field</th>

              <th class="featureTableHeader  " id="d727668e436">Field Type</th>

              <th class="featureTableHeader  " id="d727668e439">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e433" data-title="Field"><span class="keyword parmname">campaignAccessLevel</span></td>

              <td class="entry" headers="d727668e436" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoNone</samp> (enumeration of
                type string)
              </td>

              <td class="entry" headers="d727668e439" data-title="Description">A value that represents the level of access that a group or role is granted for
                a campaign. The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                  <li class="li"><samp class="codeph nolang">All</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e433" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e436" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e439" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.This
                field is available in API version 29.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e433" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e436" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e439" data-title="Description">Name for the sharing rule. Corresponds to <strong class="ph uicontrol">Label</strong> in the
                user interface.</td>

            </tr>

          </tbody>

        </table>

## CaseOwnerSharingRule

Represents a sharing rule for a case with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

CaseOwnerSharingRule is used by the ownerRules field in [CaseSharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#CaseSharingRules). All the following fields are required.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e549">Field</th>

              <th class="featureTableHeader  " id="d727668e552">Field Type</th>

              <th class="featureTableHeader  " id="d727668e555">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e549" data-title="Field"><span class="keyword parmname">caseAccessLevel</span></td>

              <td class="entry" headers="d727668e552" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelReadEdit</samp> (enumeration of
                type string)
              </td>

              <td class="entry" headers="d727668e555" data-title="Description">Required. A value that represents the level of access that a group or role is
                granted for a case. The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e549" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e552" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e555" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.This
                field is available in API version 29.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e549" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e552" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e555" data-title="Description">Required. Name for the sharing rule. Corresponds to
                <strong class="ph uicontrol">Label</strong> in the user interface.
              </td>

            </tr>

          </tbody>

        </table>

## ContactOwnerSharingRule

Represents a sharing rule for a contact with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

ContactOwnerSharingRule is used by the ownerRules field in [ContactSharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#ContactSharingRules).

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e661">Field</th>

              <th class="featureTableHeader  " id="d727668e664">Field Type</th>

              <th class="featureTableHeader  " id="d727668e667">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e661" data-title="Field"><span class="keyword parmname">contactAccessLevel</span></td>

              <td class="entry" headers="d727668e664" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelReadEdit</samp> (enumeration of
                type string)
              </td>

              <td class="entry" headers="d727668e667" data-title="Description">Required. A value that represents the level of access that a group or role is
                granted for a contact. The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e661" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e664" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e667" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.This
                field is available in API version 29.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e661" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e664" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e667" data-title="Description">Required. Name for the sharing rule. Corresponds to
                <strong class="ph uicontrol">Label</strong> in the user interface.
              </td>

            </tr>

          </tbody>

        </table>

## LeadOwnerSharingRule

Represents a sharing rule for a lead with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

LeadOwnerSharingRule is used by the ownerRules field in [LeadSharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#LeadSharingRules).

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e770">Field</th>

              <th class="featureTableHeader  " id="d727668e773">Field Type</th>

              <th class="featureTableHeader  " id="d727668e776">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e770" data-title="Field"><span class="keyword parmname">leadAccessLevel</span></td>

              <td class="entry" headers="d727668e773" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelReadEdit</samp> (enumeration of
                type string)
              </td>

              <td class="entry" headers="d727668e776" data-title="Description">Required. A value that represents the level of access that a group or role is
                granted for a lead. The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e770" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e773" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e776" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.This
                field is available in API version 29.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e770" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e773" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e776" data-title="Description">Required. Required. Name for the sharing rule. Corresponds to
                <strong class="ph uicontrol">Label</strong> in the user interface.
              </td>

            </tr>

          </tbody>

        </table>

## OpportunityOwnerSharingRule

Represents a sharing rule for an opportunity with users other than the owner. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

OpportunityOwnerSharingRule is used by the ownerRules field in [OpportunitySharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#OpportunitySharingRules).

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e882">Field</th>

              <th class="featureTableHeader  " id="d727668e885">Field Type</th>

              <th class="featureTableHeader  " id="d727668e888">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e882" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e885" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e888" data-title="Description">Required. Name for the sharing rule. Corresponds to
                <strong class="ph uicontrol">Label</strong> in the user interface.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e882" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e885" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e888" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.This
                field is available in API version 29.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e882" data-title="Field"><span class="keyword parmname">opportunityAccessLevel</span></td>

              <td class="entry" headers="d727668e885" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelReadEdit</samp> (enumeration of
                type string)
              </td>

              <td class="entry" headers="d727668e888" data-title="Description">Required. A value that represents the level of access that a group or role is
                granted for an opportunity. The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## AccountTerritorySharingRule

Represents a rule for sharing an account within a territory. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

AccountTerritorySharingRule is used by the ownerRules field in [AccountTerritorySharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#AccountTerritorySharingRules).

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e995">Field</th>

              <th class="featureTableHeader  " id="d727668e998">Field Type</th>

              <th class="featureTableHeader  " id="d727668e1001">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e995" data-title="Field"><span class="keyword parmname">accountAccessLevel</span></td>

              <td class="entry" headers="d727668e998" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoNone</samp> (enumeration of
                type string)
              </td>

              <td class="entry" headers="d727668e1001" data-title="Description">Required. A value that represents the level of access that a Territory or
                TerritoryAndSubordinates group is granted for an account territory. The possible
                values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                  <li class="li"><samp class="codeph nolang">All</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e995" data-title="Field"><span class="keyword parmname">caseAccessLevel</span></td>

              <td class="entry" headers="d727668e998" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoAll</samp> (enumeration of type
                string)
              </td>

              <td class="entry" headers="d727668e1001" data-title="Description">Required. A value that represents the level of access that a Territory or
                TerritoryAndSubordinates group is granted for all child cases to an account. The
                possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">None</samp></li>

                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e995" data-title="Field"><span class="keyword parmname">contactAccessLevel</span></td>

              <td class="entry" headers="d727668e998" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoAll</samp> (enumeration of type
                string)
              </td>

              <td class="entry" headers="d727668e1001" data-title="Description">Required. A value that represents the level of access that a Territory or
                TerritoryAndSubordinates group is granted for all related contacts on an account.
                The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">None</samp></li>

                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e995" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e998" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e1001" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.This
                field is available in API version 29.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e995" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e998" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e1001" data-title="Description">Required. Name for the sharing rule. Corresponds to
                <strong class="ph uicontrol">Label</strong> in the user interface.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e995" data-title="Field"><span class="keyword parmname">opportunityAccessLevel</span></td>

              <td class="entry" headers="d727668e998" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelNoAll</samp> (enumeration of type
                string)
              </td>

              <td class="entry" headers="d727668e1001" data-title="Description">Required. A value that represents the level of access that a Territory or
                TerritoryAndSubordinates group is granted for all opportunities associated with an
                account. The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">None</samp></li>

                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## CustomObjectOwnerSharingRule

Represents a sharing rule for custom objects. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

CustomObjectOwnerSharingRule is used by the ownerRules field in [CustomObjectSharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#CustomObjectSharingRules).

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e1201">Field</th>

              <th class="featureTableHeader  " id="d727668e1204">Field Type</th>

              <th class="featureTableHeader  " id="d727668e1207">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e1201" data-title="Field"><span class="keyword parmname">accessLevel</span></td>

              <td class="entry" headers="d727668e1204" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e1207" data-title="Description">Required. A value that represents the level of access that a group or role is
                granted to a custom object. The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                  <li class="li"><samp class="codeph nolang">All</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e1201" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e1204" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e1207" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.<p class="p" id="sharerule_descAPI"><a name="sharerule_descAPI"><!-- --></a>This field is available in API version 29.0 and
                  later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e1201" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e1204" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e1207" data-title="Description">Required. <span class="ph" id="sharingrule_name"><a name="sharingrule_name"><!-- --></a>Name for the sharing rule.</span> Corresponds
                to <strong class="ph uicontrol">Label</strong> in the user interface.</td>

            </tr>

          </tbody>

        </table>

## UserMembershipSharingRule

Represents a sharing rule to share members of a group with another group of users. It extends the OwnerSharingRule metadata type and inherits its fullName, sharedFrom, and sharedTo fields.

UserMembershipSharingRule is used by the ownerRules field in [UserSharingRules](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingrules.htm#UserSharingRules).

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d727668e1320">Field</th>

              <th class="featureTableHeader  " id="d727668e1323">Field Type</th>

              <th class="featureTableHeader  " id="d727668e1326">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d727668e1320" data-title="Field"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d727668e1323" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e1326" data-title="Description">Represents the description of the sharing rule. Maximum of 1000 characters.This
                field is available in API version 29.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e1320" data-title="Field"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d727668e1323" data-title="Field Type">string</td>

              <td class="entry" headers="d727668e1326" data-title="Description">Required. Name for the sharing rule. Corresponds to
                <strong class="ph uicontrol">Label</strong> in the user interface.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d727668e1320" data-title="Field"><span class="keyword parmname">userAccessLevel</span></td>

              <td class="entry" headers="d727668e1323" data-title="Field Type">
                <samp class="codeph nolang">ShareAccessLevelReadEdit</samp> (enumeration of
                type string)
              </td>

              <td class="entry" headers="d727668e1326" data-title="Description">Required. A value that represents the level of access that a group or role is
                granted for a user. The possible values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Read</samp></li>

                  <li class="li"><samp class="codeph nolang">Edit</samp></li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").

- [← Previous](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_cbsrule.htm "CriteriaBasedSharingRule")