Deactivating an Admin User
Scenario: Changing a System Administrator on an org. The previous System Admin needs to be deactivated. What is it going to take to extricate that user from all the things that it needs to be removed from in order to Deactivate the user.
Official Salesforce Documentation https://help.salesforce.com/s/articleView?id=000385333&type=1
Before Deactivating
To Start, here are some things that need to be looked at before deactivating the Admin User
Remove all assigned licences for the Admin User
Documentation! Now is the time to Document all the integrations, user accounts, and anything that will help this process next time.
Deactivate the User
Method: Go to User, Edit it, Uncheck Active, Save. Deal with the warning message. Rinse. Repeat. Each numbered point is each time this process had to be done.
Change the Default Web to Lead User
Change the Default Lead Owner
Change the Default Case Owner
Change the Automated Case User
Change the Default Workflow/Process User
Then there is the things that can go wrong AFTER the user is Deactivated.
Post Deactivation
Or you can do these before deactivation, but just make sure they are done.
Modify all Scheduled Jobs
Most of them have to be deleted and re-created.
Clean up any scheduled reports and scheduled jobs that are not needed.
Also manage any other Jobs that are by users that are not active.
NPSP Bulk Data Processes
These are probably scheduled jobs also, but ensure they are working well
DLRS
These are probably scheduled jobs also, but ensure they are working well
NOTE: NEVER re-create the DLRS’s to change the running user. The Flows to run a Rollup is hard coded to the API Name of the DLRS. If you re-create the DLRS and name it MyDLRSv1 and have a Flow that Runs the Rollup for MyDLRS which has been deactivated then the flow will NOT fail and the rollup will NOT run. sigh.
Also see DLRS Documentation Request issue I created for this!
Update Apex Exception Email Setting
Change the running user on all Dashboards that the Admin set up
Change Ownership of Groups
Remove the user from any Public Groups or Queues (eg Sandbox creation Public Groups)
Remove the User from receiving any emails in Email Alerts
Re-Set all sharing on Report and Dashboard Folders
Re-Set all sharing on File Folders and Email Template Folders
Log into any integration app as the new Admin (eg Campaign Monitor for Salesforce, Drawloop, Docusign)
Update the record owner for ALL records owned by the previous Admin.
This step is not 1000% necessary, but very useful
While you are there change the record owners for any other deactivated users
Change the Name of the previous Admin User…
If you have had a bad relationship with the previous Admin, it may not be very nice to see that name all the time in every record as the Created By. Change it to something unique and non provoking - eg Admin 2015, or Dev, or Partner.
Remove the Admin from any Devops / Source Control tools in use.
Eg DevOps Center, Dev Hub, CLI, SFDX, Copado, Gearset, Github
Ensure the Admin has no access to any org Metadata
Time Dependent Workflow Actions
You will need to re-trigger the records to meet the criteria for the records to meet the Workflow or Flow criteria.
Company Primary Contact in Org Settings?
Other danger areas?
Communities / Experiences
Remote Site Settings
External Auth Providers
Domains
Connected Apps
Platform Events
SSO settings
Delegated Admin settings
Notifications
Not to mention anything Einstein, Agentforce, and Data Cloud
I asked Gemini about the post deactivation steps