For list only showing licensed or not
Connect-Graph -Scopes User.Read.All, Organization.Read.AllGet-MgUser -Filter 'assignedLicenses/$count ne 0' -ConsistencyLevel eventual -CountVariable licensedUserCount -All -Select UserPrincipalName,DisplayName,AssignedLicenses | Format-Table -Property DisplayName,UserPrincipalNameExport CSV is fucked, but copy paste into Excel works if you change the format-table property to be one at a time
There a version of this that works in Script Commands