[SalesForce] How to match profile name to ant metadata profile name and vice versa

Probably you know System Administrator profile, if you try to migrate change to object or field or page or application or class permissions for the profile and you try to retrieve it, you will get an error.

Entity of type 'Profile' named 'System Administrator' cannot be found

However, if you retrieve all profiles, you might find 'Admin.profile' which looks like matching to System Administrator profile.

On Profile Standard object there is no field exposed containing 'Admin'.

There is another profile called 'StandardAul.profile' amongst the ANT metadata files. I try hard to guess which profile it matches. Does it match to Standard Platform profile?

Is there any general way to match Salesforce profile name (visible on Web Interface, in Developer Console) and if you query for it by SOQL query:

[select Id, Name,  Description from Profile]

to ANT Metadata File name? Retrieving package.xml containing:

<types>
    <members>*</members>
    <name>Profile</name>
</types>

Best Answer

I think I have finally found the solution.

While one of the possible point-and-click way is suggested by @user3375426 to create an outbound changeset and click add Profiles there (I have added here two screenshots, one for Professional Edition standard profiles mappings and another one for Enterprise Edition standard profile mappings), Profile name and API names for Professional Edition Profile name and API names for Enterprise Edition

another programmatic way is to query Fullname field on Profile using Tooling API.

In Tooling API, name field corresponds to the displayed name of Profile and Fullname field corresponds to Developer API Name of Profile. It is not possible to query by Fullname and query to retrieve Fullname are limited by 1 row, so it is not possible to get Developer API Name of every profile at once, however, it is possible to query one by one and retrieve their API name in such way.

For example, to find 'System Administrator` profile, the following query can be used

select id, name, fullName from Profile where name like '%admin%' limit 1

enter image description here

Also, we can verify that StandardAul is the Standard Platform User profile by making query

select id, name, fullName from Profile where name='Standard Platform User'

enter image description here

So the query results confirm that StandardAul is the Standard Platform User profile.

Just to summarize, the mappings for Standard Profiles in Professional Edition

Name                 API Name
Contract Manager     ContractManager
Marketing User       MarketingProfile
Solution Manager     SolutionManager
Read Only            ReadOnly
Standard User        Standard
System Administrator Admin

and the mappings for Standard Profiles in Enterprise Edition

Name                               API Name
Contract Manager                   ContractManager
Marketing User                     MarketingProfile
Solution Manager                   SolutionManager
Read Only                          ReadOnly
Standard User                      Standard
System Administrator               Admin
External Identity User             External Identity User
Guest License User                 Guest License User
High Volume Customer Portal User   High Volume Customer Portal User
Customer Community User            Customer Community User
Customer Community Plus User       Customer Community Plus User
Partner Community User             Partner Community User
Partner Community Login User       Partner Community Login User
Work.com Only User                 Work.com Only User
Chatter Only User                  Chatter Only User
Analytics Cloud Security User      Analytics Cloud Security User
Analytics Cloud Integration User   Analytics Cloud Integration User
Customer Community Login User      Customer Community Login User
Company Communities User           Company Communities User
Customer Community Plus Login User Customer Community Plus Login User
Standard Platform User             StandardAul
Related Topic