function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
280z280z 

Query to get all the Permissions related to Profiles

I'm trying to write a query that enables me to audit what permissions are granted to all the different profiles.

 

I'm able to get the 70+ Aministrative Permissions and General User Permissions but I'm not able to find out where the CRUD permissions are for the Standard and Custom Objects.

 

I'd also love to be able to obtain what the Profile settings are for the Tabs and Apps as well, if possible.

 

I've been searching the boards, SOQL postings, etc and have no luck, been scouring the IDE and DataLoader for clues to where these settings might be residing. Can anyone help?   Surely someone else has this issue too.

 

 

sfdcfoxsfdcfox

You're not "missing anything" in related to your search. You can't run a SOSL/SOQL query that will give you CRUD permissions directly. In Apex Code, you have to use Schema.SobjectType.getDescribe() to determine things like editability (see the Apex Code Developer's Guide), and outside of the platform (e.g. Java, PHP, etc) you'd use the Metadata API (see the Metadata API Developer's Guide). Let me know what you're trying to do, and I'll see if there's any further information I can provide for you.

280z280z

Thanks for the reply, I was going crazy trying to find a way to get the info I need.

 

I don't know anything about coding...  I am the Admin for my Company's Salesforce.  Is there a sample Apex code that will generate a file or matrix with all the permissions (Tabs, Apps, Standard Objects & Custom Objects) for each of the profiles? 

sfdcfoxsfdcfox

I'm not aware of anything really out there to date. I was working on a side project some years back when the metadata API was introduced, but I never got around to completing it (or even getting it to a usable state). A cursory Google search suggests that there's still nothing like what you're looking for. The new "enhanced profile viewer" in setup is still probably your best bet for understanding permissions.