1. Log in to your Salesforce Org.
2. Click on the gear icon (⚙️) in the top-right corner -> select Developer Console.
3. In the Developer Console, go to Debug -> Open Execute(Ctr+E) anonymous window.Paste the bellow apex code into the anonymous window:
String orgId = UserInfo.getOrganizationId();
// List of internal user Ids whose emails are not verified
List<String> userIds = [SELECT User.Name, User.id, User.Email, User.LastLoginDate, HasUserVerifiedEmailAddress, User.IsActive, User.Region__c FROM TwoFactorMethodsInfo WHERE HasUserVerifiedEmailAddress=false AND User.IsActive =true];// Send email verification to each user
for (String userId : userIds) {
System.debug(‘Sending verification to: ‘ + userId);
UserManagement.sendAsyncEmailConfirmation (userId, null, null, null);
}
NOTE: Query on TwoFactorMethodsInfo object support only if two factor Two-FA enabled on your Salesforce org.
✅ That’s it! The email verification emails will be sent asynchronously to all the specified internal users.