PermissionSet defines additional access that you can grant to users without changing their profiles. It is additive: it grants permissions but cannot deny access granted by a profile, another permission set, or another source. Removing a grant from one permission set therefore does not establish that an assigned user has lost that access.
A permission set definition is not a complete statement of a user's effective access. Actual assignments, other grants, license eligibility, and any required session activation also matter. The inherited fullName identifies the metadata component; label is its display label. Do not assume that every row returned from the runtime PermissionSet object represents an independent, deployable permission set.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
Inherited metadata identity. The metadata file name matches the permission set API name, not its display label. |
label |
Required display label, limited to 80 characters. |
hasActivationRequired |
When true, requires an associated active session. Assignment alone does not activate the permissions. |
license |
Identifies either an associated permission set license or a user license. These are different licensing relationships. |
objectPermissions |
Grants object access through allowCreate, allowRead, allowEdit, and allowDelete. Also contains viewAllRecords, modifyAllRecords, and viewAllFields, which have different scopes. |
fieldPermissions |
Names a field through field and grants readable and editable access. Required-field permissions cannot be retrieved or deployed. Broad field visibility can suppress individual entries during retrieval. |
userPermissions |
Enables named app or system permissions. Retrieval returns only enabled permissions; a permission omitted from deployment is disabled in this permission set. |
applicationVisibilities |
Uses application and visible to control app visibility. Supports standard and custom apps. |
tabSettings |
Uses tab and visibility. Allowed visibility values are Available, None, and Visible. |
recordTypeVisibilities |
Controls record-type visibility through recordType and visible. Entries for inactive record types are never retrieved or deployed. |
classAccesses |
Uses apexClass and enabled to grant execution of methods in a top-level Apex class. |
pageAccesses |
Uses apexPage and enabled to grant Visualforce page execution. |
flowAccesses |
Uses flow and enabled to grant access to a named flow. It does not activate the flow. The default for enabled is false. |
externalCredentialPrincipalAccesses |
Grants access to an external credential principal through externalCredentialPrincipal and enabled. The reference combines the external credential name and principal name with a dash. |
externalDataSourceAccesses |
Uses externalDataSource and enabled to grant access to external data sources whose identity type is Per User. |
Behavior and Constraints
Assignment, activation, and licenses
When hasActivationRequired is true, the permission set requires an associated active session. A user can have an assignment without its permissions currently being active.
Do not interpret license solely as a user-license designation. It can identify a permission set license instead. Assignment diagnosis must account for both the user's license eligibility and the licenses actually assigned to that user. A missing recorded license association also does not reliably establish that the permissions included in the set are license-free, as described in the reported assignment case below.
Object, record, and field access
Object permissions distinguish create, read, edit, and delete access from broader record access:
-
objectPermissions.viewAllRecordspermits viewing all records of the specified object regardless of its sharing settings, including private records. -
objectPermissions.modifyAllRecordspermits viewing, editing, and deleting all records of that object regardless of sharing.
These are object-scoped counterparts to the broader View All Data and Modify All Data user permissions. Field access is a separate dimension: fieldPermissions records readable and editable grants, while objectPermissions.viewAllFields grants visibility to all fields and field data for the object. viewAllFields is not the same as viewAllRecords.
When viewAllFields is enabled for an object, retrieval does not return its individual fields under fieldPermissions. Their absence is not evidence that the permission set lacks field access. If you later disable viewAllFields, the individual field entries are returned again, and you can remove their access manually. Disabling the broad permission is not equivalent to clearing the individual grants.
Visibility and other access domains
App, tab, and record-type visibility are distinct from object and field permissions. For tabSettings.visibility:
-
Availableexposes the tab on All Tabs and lets users customize their display to make it visible in an app. -
Visiblealso places the tab among its associated app's visible tabs. Users can customize their display to hide it or show it in other apps. -
Nonesupplies no tab availability through this permission set. It does not override a grant from another source.
The nested access structures grant access to other components; they do not define those components. customPermissions.name identifies a custom permission. customMetadataTypeAccesses.name identifies a custom metadata type whose records are readable, while customSettingAccesses.name identifies a readable custom setting. These name elements must not be treated as one common identifier category.
Other access domains include employee agents through agentAccesses and Email-to-Case routing addresses through emailRoutingAddressAccesses. The nested servicePresenceStatus reference grants availability of a service presence status to assigned users rather than defining the status itself.
Administrative access
Accessing this metadata type requires at least one of these permissions:
- View Setup and Configuration
- Manage Session Permission Set Activations
- Assign Permission Sets
- Manage Profiles and Permission Sets
View Setup and Configuration is specifically required to view detailed settings: client settings, field permissions, layout assignments, object permissions, permission dependencies, tab settings, permission set group components, and record types. Meeting another type-access permission does not replace this detailed-view prerequisite.
Deployment and Retrieval
In Metadata API format, permission sets are stored in the permissionsets directory with the .permissionset extension. For example, the component User_Management_Perms is stored as permissionsets/User_Management_Perms.permissionset. PermissionSet supports the wildcard * in package.xml, the manifest that selects components for retrieval or deployment.
Permission set retrieval is documented to include all content exposed through Metadata API, including Apex access and object and field permissions. Deployment must include the permission set's complete metadata to avoid unintentionally overwriting its contents. Treat deployment as a complete-definition operation, not as an operation that merely adds the listed grants.
For userPermissions, the omission rule is explicit: retrieval returns only enabled permissions, and a permission omitted from deployment is disabled in this permission set. That removal does not deny the same permission if another source grants it.
Other missing entries require their own interpretation:
- Only enabled
customPermissionsandemailRoutingAddressAccessesentries are retrieved. - Field-permission queries return only permissions enabled in the set, subject to the
viewAllFieldssuppression described above. -
recordTypeVisibilitiesis never retrieved or deployed for inactive record types. - Permissions for required fields cannot be retrieved or deployed.
For fieldPermissions.field, use an API name in Object.Field notation, such as Warehouse__c.Description__c. For shared Activity fields, specify Event or Task, such as Event.Meeting__c, rather than Activity.
Metadata API can make some fields editable even when Setup does not offer that change. Asset.ProductCode is a documented example. A difference between retrieved editable metadata and the available Setup controls is therefore not necessarily a failed deployment.
Salesforce also documents retrieval and deployment of access settings for managed components. See Managed Component Access manifest examples. The conflicting guidance about including related components in a retrieval manifest is described below.
Relationships
The references below connect access entries to other metadata components. They do not include those components' definitions, and incoming references do not establish that any particular user is assigned the permission set.
External authentication uses a multistep relationship. externalCredentialPrincipalAccesses grants access to an ExternalCredential principal. Assigned users can then make callouts through a NamedCredential that references that external credential. The named credential is an indirect connection, not the value stored in the permission set's principal reference.
externalCredentialPrincipal combines the external credential name and principal name with a dash: myExternalCredential-myPrincipal. For packaged components, the documented form is namespacePrefix__myExternalCredential-myPrincipal. Preserve both the double underscore and the dash. External data source access for Per User identity is a separate mechanism.
References
-
ApexClass:classAccesses.apexClass. -
ApexPage:pageAccesses.apexPage. -
CustomApplication:applicationVisibilities.application. -
CustomField:fieldPermissions.field, usingObject.Fieldnotation. -
CustomMetadata:customMetadataTypeAccesses.name, an access association that names the custom metadata type whose records are readable, not an individual record. -
CustomObject:objectPermissions.object;customSettingAccesses.nameidentifies the custom setting for read access. -
CustomPermission:customPermissions.name. -
CustomTab:tabSettings.tab. -
ExternalCredential:externalCredentialPrincipalAccesses.externalCredentialPrincipal, combining the credential and principal names. -
ExternalDataSource:externalDataSourceAccesses.externalDataSource. -
Flow:flowAccesses.flow, for access rather than activation. -
RecordType:recordTypeVisibilities.recordType, using a name such asAccount.MyRecordType. -
ServicePresenceStatus: nestedservicePresenceStatus.
Referenced By
-
BotBlock:permissionSet. -
BotTemplate:permissionSet. -
ConnectedApp:permissionSetName. -
DelegateGroup:permissionSets. -
Network:permissionSet. -
PermissionSetGroup:permissionSets. -
PortalDelegablePermissionSet:permissionSet.
Documentation Inconsistencies
Salesforce's retrieval guidance conflicts on whether related components must be included in the manifest. The permission set behavior states that retrieval includes all content exposed through Metadata API. The manifest guidance on the same type page says to retrieve related components with assigned permissions, specifically requiring the CustomObject component to obtain objectPermissions and fieldPermissions for a custom object.
This conflict does not remove the documented deployment risk: deploying an incomplete permission set definition can overwrite its contents. Missing access entries must also be interpreted in light of enabled-only retrieval, inactive record types, required fields, and viewAllFields.
Reported Issues
-
Assignment can require a permission set license even without a recorded license association. In February 2026, an administrator reported an assignment failure because an included object required a permission set license, although the runtime
PermissionSetrecord had noLicenseId. This distinguishes the set's recorded association from licensing required by its included permissions; it does not establish a universal object-to-license mapping. License-related assignment report. -
A missing-field deployment error can involve destination-state residue rather than a reference in source. In an August 2021 continuous integration deployment, the named
OrderItemfield was absent from source but remained among deleted fields in the destination. Deployment eventually succeeded after the author erased the field and reopened and saved the permission set's object settings. The author could not determine whether that save or delayed deletion cleanup resolved the failure, so these actions are not an established repair sequence. Deleted-field deployment report. -
A runtime inventory can include rows that are not independent permission set metadata assets. A November 2023 discussion described
Type=ProfileandType=Grouprows representing profiles and permission set groups. This matters when reconciling SOQL, Salesforce's query language, results with deployable metadata.Type,ProfileId, andPermissionSetGroupIdin that discussion are runtime-object fields, not elements of this metadata definition. Runtime permission set types. -
An unexpected app entry can block deployment when the destination lacks the app. In a 2023 deployment report,
applicationVisibilitiescontainedstandard__Work. The author reported that Salesforce Support attributed the entry to bug W-3848813 and that removing it allowed deployment. The entry reportedly had to be removed again on subsequent commits of that permission set. This is a reported workaround for that case, not a general instruction to remove standard app access. Unexpected standard app deployment report.
Common Questions
Why does a user still have access after I remove a permission from a permission set?
Permission sets grant access; they do not deny it. Removing one grant does not remove a grant from the user's profile, another permission set, or another source. The definition alone is not a complete account of the user's effective access.
Why are field permissions missing from a retrieved permission set?
If objectPermissions.viewAllFields is enabled, individual fields are not returned under fieldPermissions. Required-field permissions also cannot be retrieved, and field-permission queries return only enabled permissions. Missing entries therefore do not, by themselves, establish a lack of field access.
Can I deploy a permission set file containing only the permissions I changed?
Do not treat that file as an additive patch. Deployment requires the complete permission set metadata to avoid overwriting contents. For userPermissions, an omitted permission is explicitly disabled in that permission set.
Why does assignment require a license when the permission set has no LicenseId?
A reported case showed that an included object could require a permission set license even when the runtime set had no LicenseId. Check the distinction between the set's recorded license association, the permissions it includes, and the licenses assigned to the user.
Why does deployment name a missing field that is not in my source file?
A reported case involved a field that remained among deleted fields in the destination. The deployment later succeeded after field erasure and a save of the permission set's object settings, but the report did not establish which action or delayed cleanup resolved it. A source search alone may not explain that destination-state case.