Query Salesforce Profiles with Password Never Expires

To find Salesforce Profiles with Password Never Expires permission enabled, we have to check PermissionsPasswordNeverExpires on the Profile object/entity. Please check the following SOQL which will retrieve all the Salesforce Profiles with the Permission Password Never Expires enabled. SOQL: For Query Salesforce Permission Sets with Password Never Expires, check the following: