If I pick a random entity and action, what steps can I take (manually if necessary) to see which specific permissions are necessary for CiviCRM to execute an API call with check_permissions=1?

  • 1
    Good question! It would be nice if there was an API action for this. Jul 17, 2017 at 16:06

1 Answer 1


This doesn't have a completely straightforward answer because sometimes one entity will create another entity with its own set of permissions. Additionally, permissions also get blended with ACLs and custom permission hooks. Finally, the permissions typically happen at the BAO and not API layer.

That said - the best single resource is CRM_Core_Permission::getEntityActionPermissions(). See CRM-20581 for a real-life recent example of how creating an event failed because accessing the StateProvince entity went from being a permission-skipping call to a permission-respecting call.

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.