The following PS code brings the users whose userprincipalname field is empty
Get-ADUser -Filter * -properties userprincipalname | where userprincipalname -eq $null | Format-Table -Property Name