The Get-MgUser
cmdlet does not return all properties by default, you have to specifically request them. For example, this will return all user's with the corresponding onPremisesImmutableId value:
Get-MgUser -All -Property id,onPremisesImmutableId | select Id,onPremisesImmutableId
The downside is that you need to list each individual property you want returned. Using the "beta" module cmdlets, such as Get-MgBetaUser
does return most properties by default. But there are still some that will only be returned if you specifically request them.