5

We have an application which retrieve Profiles from an Organisation but if we retrieve profile without specifying custom object or other component in package.xml file then it doesn't retrieve permission of any object. It returns user settings only, no other component permissions.

According to the documentation:

The content of a profile returned by Metadata API depends on the content requested in the RetrieveRequest message. For example, profiles only include field-level security for fields included in custom objects returned in the same RetrieveRequest as the profiles. The profile definition contains the following fields:

When you use the retrieve() call to get information about profiles in your organization, the returned .profile files only include security settings for the other metadata types referenced in the retrieve request (with the exception of user permissions, IP address ranges, and login hours, which are always retrieved). For example, the package.xml file below contains a types element that matches all custom objects, so the returned profiles contain object and field permissions for all custom objects in your organization, but do not include permissions for standard objects, such as Account, and standard fields.

It is also mentioned in a question's answer as well.

Problem is that we don't want custom object or other components in retrieved file because we already have. Is there any way by which we can skip other components definition retrieval in zip file but we get all components permission in profile?

3 Answers 3

3

Quick answer: no.

Long answer: There is no current way to do this without fetching them all and then ignoring the unnecessary stuff. The product managers know about this and have received enough feedback from the field. They are working on it but no solution right now.

I would love to be wrong about this though.

Good luck!

Sridhar

0

If you retireve the profile/permset using readMetadata api call, Salesforce returns full profile including all components access without having to retrieve the metadata for individual components. This is the great way to backup profile/permset.

1
  • This is a synchronous call and cannot handle the wildcard character. File-based call does not provide the full functionality and that is very limiting. Feb 17 at 13:34
-4

Yes there is a great deployment tool on the appexchange called: Copado which will allow you to do automated Git backups.

It is specifically designed to retrieve the Full profile and permission set content, so if you go to your Git repository, you will be able to see and compare the complete profile or permission set XML file, under profiles/XXX.profile and permissionsets/YYY.permissionset

1
  • 1
    That was not the question though. The gist as I read it was: How do I retrieve profiles without combining it with associated objects in one retrieve? And the answer is you can't - right now!
    – Sridhar
    Oct 12, 2018 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .