I'm trying to get all fields and its read and write permission using below query
SELECT Field, PermissionsRead, PermissionsEdit FROM FieldPermissions WHERE SObjectType ='Lead' AND parentId IN ( SELECT permissionSetId FROM PermissionSetAssignment where assigneeId IN('#assignee_Id #'))
I'm getting expected result :
But still some fields are missing in the output like "FirstName, LastName, Company, Street, City, Country..."
assignee_Id is System Administrator and having Field-Level access to all fields.
Facing same issue with Account and Contact.