I see the "AssignedLicenses" attribute does not contains any values in my tenant and also the signInActivity is not accessible through $user.Signinactivity rather it has moved to the additionalproperties. Please update the script if it is a change at the Get-MgUser command level.
Thanks Tony for the great script. It seems to be working fine now. I think the issue was with Scopes or Mg profile i was using in Powershell 7 vs Powershell ISE
I see the "AssignedLicenses" attribute does not contains any values in my tenant and also the signInActivity is not accessible through $user.Signinactivity rather it has moved to the additionalproperties. Please update the script if it is a change at the Get-MgUser command level.