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
Jeff Bryant 16Jeff Bryant 16 

Insufficient Privileges error when deactivating users

I'm currently writing a class that will deactivate all users that have not logged in over 60 days.
I am trying to resolve an error I'm getting when trying to deactivate a community user. I have system administrator access but still get "Insufficient Privileges" error.
Could someone point me in the right direction?
VinayVinay (Salesforce Developers) 
Hi Jeff,

Can you share a screenshot of how you are trying to deactivate a community user?

Also, check below reference that can help you to  Deactivate Community User

https://jenwlee.com/2020/05/11/deactivate-and-cleanup-a-community-user/

Thanks,