Automated Process User Profile Permissions

We are having some difficulty with permissions. Our admin has also posted on the success board., she also found this same posting: I am posting here to see if there are any devs/admins on here that have run into this issue as well.

We have a process that is called from a platform event, which sends a visualforce email template in an email alert. It seems like the Automated Process user, which is the user that triggers the Platform Event, does not have access to the email template’s visualforce controller. Is there any way to give access to the controller to that user?


I’ve found Matt’s answer on the IdeaExchange

You can follow the recommendation from Roy Lloyd and create a Permission Set and assign the autoproc User in Exec-Anonymous:

insert new PermissionSetAssignment(
    AssigneeId = [SELECT Id FROM User WHERE alias = 'autoproc'].Id,
    PermissionSetId = '<your Permission Set Id here>'

You should then be able to manage the Permission Set to add any new permissions you need.

Alternatively, use URL hacking:

Using the Developer Console to query for the autoproc Profile ID:

SELECT ProfileId FROM User WHERE Alias = 'autoproc'

Then use a URL hack to access the setup page and enable the relevant Apex Classes:


Or to Apex Pages


Or to Field Level Permissions:


Enable Apex Class Access

This resolved the error ‘You do not have sufficient privileges to access the controller’.

Source : Link , Question Author : Olivia , Answer Author : Robs

Leave a Comment