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 access | Profile + Apex class | Component |
Profile: Apex page access | Profile + Apex page | Component |
Profile: Application visibility | Profile + Custom application | Top level |
Profile: Custom permissions | Profile + Custom permissions | Top level |
Profile: External data source access | Profile + External data source | Component |
Profile: Field level security | Profile + Custom object | Component |
Profile: Layout assignment | Profile + Layout | Component |
Profile: Object permission | Profile + Custom object | Component |
Profile: Record type visibility | Profile + Custom object | Component |
Profile: Set of user permissions for a new profile | Profile | Top level |
Profile: Tab visibility | Profile + Custom object + Custom Tab | Top level |
Profile: User permission | 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 metadatahas the permissions retrieved as Custom object permissionsThe 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.

