In a trigger on Lead (which is what you're using), Trigger.new only contains the list of Lead objects that has been inserted/updated/deleted/undeleted (depending on context), which is why you cannot iterate over it as a collection of User objects. You can however build your own list of user IDs and then use that to get the User objects you require: Set<ID> userIds = new Set<Id>(); for(Lead aLead : Trigger.new) { userIds.add(aLead.CreatedById); } Map<Id, User> userMap = new Map<Id, User> ([ SELECT Id FROM User WHERE Id IN :userIds AND UserType = 'PowerPartner' AND IsActive = true ]); Set<Id> userIds = userMap.keySet();