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
sundar s 24sundar s 24 

who can create user

how to find which profile can create user and which profile can modify user
AbhinavAbhinav (Salesforce Developers) 
Hi Sundar ,

'Manage Users' permission  allows Create/Edit Internal User and have access to all User fields. Please read details in below docs

reference:
https://help.salesforce.com/articleView?id=000324398&type=1&mode=1

https://salesforce.stackexchange.com/questions/207789/who-can-create-the-users-in-salesforce


If it helps mark it as best answer.

Thanks!
Suraj Tripathi 47Suraj Tripathi 47

Hi,

You can query like this to find the user related to specific profile

select id,Name from user where Profile.Name='System Administrator'

and for modified by

select Id,Name from User where LastModifiedBy.Profile.Name = 'System Administrator'

and created by

select Id,Name from User where CreatedBy.Profile.Name = 'System Administrator'

Please mark it as the Best Answer so that other people would take references from it.

Thank You

sundar s 24sundar s 24
is it possible to query all the profile where manage user permission is enabled
 
Suraj Tripathi 47Suraj Tripathi 47

Hi,

You can take references from the below code.

public static void sendEMail() {
        List<User> userList=new List<User>([select id,ProfileId	 from user where isActive=true]);
        
        set<Id> userId=new set<Id>();
        for(User ur:userList){
            userId.add(ur.ProfileId);
        }
        List<Profile> profileList=new List<Profile>([Select Id,Name From Profile where id in: userId]);
        
     }

Please mark it as The Best Answer.

Thank You