[Solved] SOQL query for all Users who have read access to Task object

626 Asks: SOQL query for all Users who have read access to Task object
I am trying to write a SOQL query to find a list of Users who have read access to the standard Task object but my query keeps coming back empty. Is there a better way to do this?

I have a dropdown list populated with Users but they need to all have read permissions to the Task object.

Here is what I currently have that is returning 0 results:

SELECT AssigneeId 
FROM PermissionSetAssignment 
WHERE PermissionSetId 
IN (
    SELECT ParentId 
    FROM ObjectPermissions
    WHERE PermissionsRead = true
    AND SObjectType = 'Task'

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.