+ Start a Discussion
ethan huntethan hunt 

Needed SOQL query to check profile which has no user assigned

Hi ,

I needed a query which can retrieve profile names which has no user assigned to it.

Please help..


Regards
Satish_SFDCSatish_SFDC

There is no such query but you can create a matrix report.

Check the link below:
https://success.salesforce.com/ideaView?id=08730000000Gsc9

Regards,
Satish Kumar

Stephen RodenStephen Roden
This what your looking for?

select name from profile where id not in (select profileid from user)
Megan PietruszkaMegan Pietruszka
Stephen's answer is correct, someone should mark is as the best answer so that this question can be marked as solved!
Calvin Tran 7Calvin Tran 7
Thanks Stephen, this query in workbench worked perfectly for me to identify all the Profiles with no users assigned. 

select name from profile where id not in (select profileid from user)
Bajrang MBajrang M
Thanks, Stephen. This worked perfectly and saved a lot of time.