---
schema_version: "1"
id: 6e3bdcebb3bc38e88e1dde2535b71a1249a8d0a8bd93d6d18cb0c4910db48092
title: FolderShare
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_foldershare.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_foldershare.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9773abc974af48c29e79186d950749d1e3eacdedaef09fdcdfef25086ecac74f
description: Represents the settings for enhanced analytics folder sharing. Users can control access to reports or dashboards by giving others Viewer, Editor, or Manager access to the folder that contains the report or dashboard.
---
# FolderShare

Represents the settings for enhanced analytics folder sharing. Users can control access to reports or dashboards by giving others Viewer, Editor, or Manager access to the folder that contains the report or dashboard.

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

#### Important

During package installation, FolderShare for DashboardFolder and ReportFolder is ignored.

## File Suffix and Directory Location

FolderShare objects are stored in the reports and dashboards directories. For each report or dashboard folder it contains, there’s a metadata file named FolderName\-meta.xml. The FolderName\-meta.xml metadata file contains the metadata information for that folder, such as the accessLevel. For example, if the reports directory contains a reports folder named myReportsFolder, it also has a myReportsFolder-meta.xml file at the same level as myReportsFolder.

## Version

FolderShare components are available in API version 28 and later.

## Fields

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



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

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

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

            </tr>

          </thead>

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

              <td class="entry" headers="d526665e115" data-title="Field Type">FolderShareAccessLevel (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d526665e118" data-title="Description">Required. Specifies the combination of actions that can be taken on the folder.
                Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">View</samp>. User can run a report or refresh a
                    dashboard, but can’t edit them. All users have at least Viewer access to
                    report and dashboard folders that have been shared with them. (Some users can
                    have administrative permissions that give them greater access.)
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">EditAllContents</samp>. Users can view and
                    modify the reports or dashboards in the folder, and move them to and from any
                    other folders that they have equivalent access to.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Manage</samp>. Users can do everything Viewers
                    and Editors can do, plus control other users’ access to a folder.
                  </li>

                </ul>
              </td>

            </tr>

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

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

              <td class="entry" headers="d526665e118" data-title="Description">Required. Specifies the user, group, or role that has the specified access
                level to the folder. </td>

            </tr>

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

              <td class="entry" headers="d526665e115" data-title="Field Type">FolderSharedToType (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d526665e118" data-title="Description">Required. Specifies the type of entity that the folder is shared with. Valid
                values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Group</samp>. Users in a specified public group
                    have the specified access level to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Manager</samp>.
                    Available in API version
                    29.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ManagerAndSubordinatesInternal</samp>.
                    Available in API version
                    29.0 and later.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Role</samp>. Users with a specified role have
                    the specified access level to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">RoleAndSubordinates</samp>. Users with a
                    specified role, and users with a role subordinate to that role, have the
                    specified access level to the folder. Only available when digital experiences is
                    enabled for your org and Experience Cloud site users are created with external
                    account roles other than a shared person account role.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">RoleAndSubordinatesInternal</samp>. Users with a
                    specified role and users with a role subordinate to that role, except public
                    portal users, have the specified access level to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Organization</samp>. All internal users have the
                    specified access level to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Territory</samp>. Users in a specified territory
                    have the specified access level to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">TerritoryAndSubordinates</samp>. Users in a
                    specified territory, and users in territories subordinate to the specified
                    territory, have the specified access level to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">AllPrmUsers</samp>. All PRM Portal users have
                    the specified level of access to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">User</samp>. The specified individual user has
                    the specified level of access to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PartnerUser</samp>. The specified individual
                    user of a partner portal has the specified level of access to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">AllCspUsers</samp>. All Customer Success Portal
                    users have the specified level of access to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CustomerPortalUser</samp>. The specified
                    individual user of a customer portal has the specified level of access to the
                    folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PortalRole</samp>. Users with a specified role
                    in a portal have the specified access level to the folder.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PortalRoleAndSubordinates</samp>. Portal users
                    with a specified role, and portal users with a role subordinate to that role,
                    have the specified access level to the folder.
                  </li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a FolderShare component for a dashboard folder:

<?xml version="1.0" encoding="UTF-8"?>
<DashboardFolder xmlns="http://soap.sforce.com/2006/04/metadata">
  <folderShares\>
        <accessLevel\>View</accessLevel\>
        <sharedTo\>R1</sharedTo\>
        <sharedToType\>Role</sharedToType\>
    </folderShares\>
</DashboardFolder\>

Here’s an example of a FolderShare component for a report folder:

<?xml version="1.0" encoding="UTF-8"?>
<ReportFolder xmlns="http://soap.sforce.com/2006/04/metadata">
  <folderShares\>
       <accessLevel\>View</accessLevel\>
        <sharedTo\>R1</sharedTo\>
        <sharedToType\>Role</sharedToType\>
    </folderShares\>
</ReportFolder\>

## Wildcard Support in the Manifest File

This metadata type doesn’t support 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.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).