Skip to main content

How to retrieve and deploy Profiles and their components

Guidance on how to use the metadata filter to find changes to Profiles.

Written by Valerio Chang

Why are Profiles different?

Profiles are different to many other metadata types on the Metadata API. The subcomponents returned by Salesforce for a profile depend on the other metadata types in your metadata filter.

For example, if you select just the Profile metadata type in your custom metadata filter and run a comparison, you'll get only the user permissions of the Profile.

So which metadata types should you include in the custom filter to retrieve each individual part?

We created a Default profiles and permission sets comparison filter for those of you that don't need the details further below. Not sure how to manage your custom metadata filter? See here.

Here is a handy reference table showing you which other metadata types you'll need to include in your filter to get each subcomponent type in your profile:

Metadata Type in results page

Custom Filter

Top level or Component

Apex class permissions

Profile + Apex class

Top level

Apex page permissions

Profile + Apex page

Top level

Custom field permissions

Profile + Custom object

Top level

Custom object permissions

Profile + Custom object

Top level

Flow permissions

Profile + Flow definition

Top level

Layout permissions

Profile + Layout + (Custom object)

Top level

Profile

Top level

Profile Password Policy

Top level

Profile Session Setting

Top level

Profile + Apex class

Component

Profile + Apex page

Component

Profile + Custom application

Top level

Profile + Custom permissions

Top level

Profile + External data source

Component

Profile + Custom object

Component

Profile + Layout

Component

Profile + Custom object

Component

Profile + Custom object

Component

Profile: Set of user permissions for a new profile

Profile

Top level

Profile + Custom object + Custom Tab

Top level

Profile

Top level

Profile: Flow access

Profile + Flow definition

Component (API' 44 or below)

  • The Custom Filter column lists the metadata types you need to select in Gearset's custom metadata filters to retrieve the profile component

  • Custom metadata has the permissions retrieved as Custom object permissions

  • The Top level or Component column defines if the profile component will appear as a top level item in the results, or is a subcomponent of another top level item

  • To view subcomponent items, you may need to expand out its parent object in the comparison results, see examples below.

  • System permissions are located within the Profile metadata type, and you just need Profile metadata type to retrieve that in Gearset.

How Gearset makes retrieving Profiles simpler

Read about the Profile and permissions visualizer here.

Did this answer your question?