---
schema_version: "1"
id: 2f1dc5c4872bdc8f879b713c8abee40c7df5d1bbf00a8ef5833ad5d251edc805
title: Role
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_role.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_role.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a803af9071a864f68f940f23b20b8bd99570fc1a4d6a1458729228dc4a84b04d
description: Represents a role in your organization.
---
# Role

Represents a role in your organization.

## Declarative Metadata File Suffix and Directory Location

The file suffix for role components is .role and components are stored in the roles directory of the corresponding package directory.

## Version

Role components are available in API version 24.0 and later.

## Fields

This metadata type extends to subtype [RoleOrTerritory](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_roleorterritory.htm#meta_roleorterritory "Represents the common base type and valid values for role or territory.").

| Field Name | Field Type | Description |
| --- | --- | --- |
| 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. Corresponds to **Role Name** in the user interface. |
| parentRole | string | The role above this role in the hierarchy. |

## Declarative Metadata Sample Definition

The following is the definition of a role.

<?xml version="1.0" encoding="UTF-8"?>
<Role xmlns="http://soap.sforce.com/2006/04/metadata">
    <caseAccessLevel\>Edit</caseAccessLevel\>
    <contactAccessLevel\>Edit</contactAccessLevel\>
    <description\>Sample Role</description\>
    <mayForecastManagerShare\>false</mayForecastManagerShare\>
    <name\>R22</name\>
    <opportunityAccessLevel\>Read</opportunityAccessLevel\>
</Role\>

## 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.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).