---
schema_version: "1"
id: 3f14f71014eb9adf928239095eefaf980b2eac9ce8a6f8f4f2025760be1faa11
title: SharingSettings
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_sharingsettings.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_sharingsettings.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: dba40bb72eb899652a027ecf9748194cc3e544138fd7781250ae8c2dfb6edaf8
description: Represents an organization’s sharing, visibility, and data access settings. This type extends the Metadata metadata type and inherits its fullName field.
---
# SharingSettings

Represents an organization’s sharing, visibility, and data access settings. This type extends the Metadata metadata type and inherits its fullName field.

In the package manifest, all organization settings metadata types are accessed using the Settings name. See [Settings](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_settings.htm "Represents the organization settings related to a feature. For example, your password policies, session settings and network access controls are all available in the SecuritySettings component type.") for details.

## File Suffix and Directory Location

SharingSettings values are stored in the Sharing.settings file in the settings directory. The .settings files are different from other named components because there’s only one settings file for each settings component.

## Version

SharingSettings

## Special Access Rules

To use SharingSettings, you need the Manage Sharing permission.

## Fields

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



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

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

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

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">deferGroupMembership</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether group membership calculations are suspended (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">false</samp>. This field is available in API version 49.0 and later.<div class="box message confirm">
                  <div class="inner">
                    <div class="bd">
                      <div class="media">
                        <img class="img mtm" src="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png" alt="Important">
                        <div class="mediaBd">
                          <h4 class="mbs">Important</h4>
                          <p>
                          </p><ul class="ul bulletList">
                            <li class="li">The defer sharing calculation feature isn't enabled by default. To enable it
                              for your Salesforce org, contact Salesforce Customer Support.</li>

                            <li class="li">When you change the value of this field from <samp class="codeph nolang">true</samp> to <samp class="codeph nolang">false</samp>, group
                              membership is automatically recalculated. Sharing rules are also automatically
                              recalculated, unless the <span class="keyword parmname">deferSharingRules</span> field is set
                              to <samp class="codeph nolang">true</samp> prior to modifying
                              <span class="keyword parmname">deferGroupMembership</span>. Depending on your org, these
                              recalculations can take a significant amount of time to complete.
                            </li>

                            <li class="li">If the <span class="keyword parmname">deferGroupMembership</span> field is set to <samp class="codeph nolang">true</samp>, you can’t change the value of
                              <span class="keyword parmname">deferSharingRules</span>. Sharing rule calculations are
                              suspended regardless of the value of
                              <span class="keyword parmname">deferSharingRules</span>.
                            </li>

                          </ul>

                          <p></p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">deferSharingRules</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether sharing rule calculations are suspended (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">false</samp>. This field is available in API version 49.0 and later.<div class="box message confirm">
                  <div class="inner">
                    <div class="bd">
                      <div class="media">
                        <img class="img mtm" src="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png" alt="Important">
                        <div class="mediaBd">
                          <h4 class="mbs">Important</h4>
                          <p>
                          </p><ul class="ul bulletList">
                            <li class="li">The defer sharing calculation feature isn't enabled by default. To enable it
                              for your Salesforce org, contact Salesforce Customer Support.</li>

                            <li class="li">When you change the value of this field from <samp class="codeph nolang">true</samp> to <samp class="codeph nolang">false</samp>, sharing rules
                              are automatically recalculated. Depending on your org, this recalculation can
                              take a significant amount of time to complete. </li>

                            <li class="li">If the <span class="keyword parmname">deferGroupMembership</span> field is set to <samp class="codeph nolang">true</samp>, you can’t change the value of
                              <span class="keyword parmname">deferSharingRules</span>. Sharing rule calculations are
                              suspended regardless of the value of
                              <span class="keyword parmname">deferSharingRules</span>.
                            </li>

                          </ul>

                          <p></p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableAccountRoleOptimization</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether person roles are assigned to new site users in accounts
                without existing users (<samp class="codeph nolang">true</samp>) or if regular
                site roles are created for new users (<samp class="codeph nolang">false</samp>).
                This field has a default value of <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableAssetSharing</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether sharing is enabled for assets (<samp class="codeph nolang">true</samp>) or asset access is determined by the parent object’s sharing rules
                (<samp class="codeph nolang">false</samp>). This field has a default value of
                <samp class="codeph nolang">false</samp>.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableCommunityUserVisibility</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether site users in the same site can see each other regardless of
                the organization-wide defaults (<samp class="codeph nolang">true</samp>) or not
                (<samp class="codeph nolang">false</samp>). This field has a default value of
                <samp class="codeph nolang">false</samp>. In orgs created in API version 47.0
                and later, this setting doesn’t apply to guest users.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableExternalSharingModel</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether the external sharing model is enabled (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">true</samp> if Salesforce Experiences are enabled, and a default value of
                <samp class="codeph nolang">false</samp> if not. To use this field, you need the
                Customize Application permission.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableKeepManualSharesOnTransfer</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether manual shares on a record are retained (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>) when the record is transferred to a new owner. This field is
                available in API version 68.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableManagerGroups</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether users can share records with their managers and manager
                subordinates groups (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">false</samp>. To use this field, you need the View and
                Manage Users permission.</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableManualUserRecordSharing</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether users can share their own user record (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enablePartnerSuperUserAccess</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether you can grant super user access to partners in sites (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">false</samp>. To use this field, you need the Customize Application
                permission</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enablePortalUserCaseSharing</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether portal users can access related contacts for cases that they
                own (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enablePortalUserVisibility</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether portal users in the same customer or partner portal account
                can see each other regardless of the organization-wide defaults (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field has a default value of <samp class="codeph nolang">false</samp>. To enable this field, contact Salesforce Support.</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableRemoveTMGroupMembership</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>


              <td class="entry" headers="d869036e118" data-title="Description">Removes group membership info for the original territory management feature
                after migrating to Sales Territories when set to <samp class="codeph nolang">true</samp>. This field has a default value of <samp class="codeph nolang">false</samp>. Once this field is set to <samp class="codeph nolang">true</samp>, it can't be set to <samp class="codeph nolang">false</samp>
                again.</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableRestrictAccessLookupRecords</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether users must have read access to a record to see the record’s
                name in lookup and system fields (<samp class="codeph nolang">true</samp>) or not
                (<samp class="codeph nolang">false</samp>). This field has a default value of
                <samp class="codeph nolang">true</samp> in Salesforce orgs created in Spring ’20
                or later and a default value of <samp class="codeph nolang">false</samp> in all
                other orgs. This field is available in API version 48.0 and later.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableSecureGuestAccess</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">When <samp class="codeph nolang">true</samp>, guest users have org-wide
                defaults set to Private. To share records with them, you must use guest user sharing
                rules.<p class="p">As of API version 50.0, this field's value is always <samp class="codeph nolang">true</samp>, regardless of the value that you set.
                  Changing its value has no effect on Salesforce, even if it reads <samp class="codeph nolang">false</samp>.</p>
                <p class="p">This change applies retroactively back
                  to API version 47.0, when this field was first introduced. Previously, in API
                  version 47.0 to 49.0, this field indicated whether guest users’ record access is
                  secured (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>), and the field's default value was <samp class="codeph nolang">false</samp>. Now, in all API versions, this field's value
                  is always <samp class="codeph nolang">true</samp>, even if it reads <samp class="codeph nolang">false</samp>.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableStandardReportVisibility</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether users can view reports based on standard report types that
                may expose data of users to whom they don't have access (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). This field
                has a default value of <samp class="codeph nolang">false</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d869036e112" data-title="Field Name"><span class="keyword parmname">enableTerritoryForecastManager</span></td>

              <td class="entry" headers="d869036e115" data-title="Field Type">boolean</td>

              <td class="entry" headers="d869036e118" data-title="Description">Indicates whether forecast managers can act as delegated administrators for
                territories below them in the hierarchy (<samp class="codeph nolang">true</samp>)
                or not (<samp class="codeph nolang">false</samp>). This field has a default value
                of <samp class="codeph nolang">false</samp>.</td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a SharingSettings

<?xml version="1.0" encoding="UTF-8"?>
<SharingSettings xmlns="http://soap.sforce.com/2006/04/metadata">
    <deferGroupMembership\>false</deferGroupMembership\>
    <deferSharingRules\>false</deferSharingRules\>
    <enableAccountRoleOptimization\>false</enableAccountRoleOptimization\>
    <enableAssetSharing\>false</enableAssetSharing\>
    <enableCommunityUserVisibility\>false</enableCommunityUserVisibility\>
    <enableExternalSharingModel\>true</enableExternalSharingModel\>
    <enableKeepManualSharesOnTransfer\>true</enableKeepManualSharesOnTransfer\>
    <enableManagerGroups\>false</enableManagerGroups\>
    <enableManualUserRecordSharing\>true</enableManualUserRecordSharing\>
    <enablePartnerSuperUserAccess\>false</enablePartnerSuperUserAccess\>
    <enablePortalUserCaseSharing\>false</enablePortalUserCaseSharing\>
    <enablePortalUserVisibility\>true</enablePortalUserVisibility\>
    <enableRemoveTMGroupMembership\>false</enableRemoveTMGroupMembership\>
    <enableRestrictAccessLookupRecords\>true</enableRestrictAccessLookupRecords\>
    <enableSecureGuestAccess\>true</enableSecureGuestAccess\>
    <enableStandardReportVisibility\>false</enableStandardReportVisibility\>
    <enableTerritoryForecastManager\>false</enableTerritoryForecastManager\>
</SharingSettings\>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>Sharing</members\>
        <name\>Settings</name\>
    </types\>   
    <version\>68.0</version\>
</Package\>

## Wildcard Support in the Manifest File

The wildcard character \* (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see [Settings](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_settings.htm). For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).