1

I am using metadata API to retrieve all profiles. When I verified the downloaded zip, All profiles XML are downloaded but following properties are missing from admin.proflie . If we download profiles with eclipse then it shows following properties but now when i use my custom script.

  • applicationVisibilities
  • classAccesses
  • fieldPermissions
  • layoutAssignments
  • objectPermissions
  • pageAccesses
  • recordTypeVisibilities
  • tabVisibilities

I checked the documentation and it says API version should be 29 or above. I am using API version 34.

Any pointers why its not returning above mentioned properties.

  • You need to specify the corresponding elements in the package.xml of the retrieve call to get the profile information part related to them. – Prajith Apr 11 '16 at 6:20
  • I have specified corresponding element that is profile * but the problem is when there are few properties missing in admin.proflie as mentioned above. – AtulRajguru9 Apr 11 '16 at 6:30
  • Good the issue got resolved. I was mentioning the same point - in case you want permissions related to a component on the profile or permission set - then you need to mention that component ex class, page, object etc on the package.xml. Thanks – Prajith Apr 11 '16 at 14:39
  • oh ok, thanks Stygon. Kevin posted it as answer with example that helped me and so accepted his answer. May be you should have posted this as answer with example. This will not just improve your score but help the community. Thank you once again! – AtulRajguru9 Apr 12 '16 at 3:44
  • Haha. Sure get your point man. My Laziness triumphed ;) . Personally I do believe points are secondary, when I think of SFSE all am expecting is a friendly neighbourhood with everyone ready to help and a lot of interesting conversation to read. Beats most of the other sites any day. I really do value your opinion friend. Good that your issue was resolved . Cheers – Prajith Apr 12 '16 at 3:57
4

You need to also retrieve the components that you wish to view the profile data for. For example, if you want the fieldPermissions elements to be present in the Profile XML, then you need to specify that you wish to retrieve each CustomObject either using the wildcard syntax or explicitly enumerating them.

This can be a real pain!

if you just need to quickly verify something about your profiles, then I recommend you use our (Gearset) 30-day free trial and grab the profiles that way.

| improve this answer | |
  • Thank you for your answer. Is there any official documentation pointing to this? – AtulRajguru9 Apr 11 '16 at 10:20
  • 1
    There is some 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 taken from developer.salesforce.com/docs/atlas.en-us.api_meta.meta/… but most of it is hard won knowledge from working on Gearset! We have worked around lots of interesting platform quirks to get to the deployment success rates our customers enjoy – Kevin Boyle Apr 11 '16 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.