HI, you can leverage PowerShell commands to perform the bulk action. Set-AzureADUser with pipeline.
refer the sample article below and modify the user parameters according to your requirements (ie last name and other fields which you like to clear out.)