No module Published on Offcanvas position

Get List 365 users with assigned licences

To be honest, there isn't much reason to use this. The Microsoft Admin portal if you have access has an simple export button that does the same thing.
I only made this because at the time I didn't have access to the admin portal because it was managed by another department and I needed to see who has a Office license at that moment

The script can be found here: https://github.com/MoebiusZero/Scripts/blob/main/Powershell/GetAssignedLicenses365.ps1

It simply uses the MSonline module to connect and Get-Msoluser command to get the list with users with a license for processing.
The license names it reports are not the same as you see them in the Admin portal, you will have to do a bit of translating.
You can find the list here: https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/licensing-service-plan-reference
The second column String ID is what the powershell command reports back, you will need to find and modify the command below and add any license translations for your environment.

switch -wildcard ($($license.Accountskuid.tostring())) {
                '*ENTERPRISEPACK' { $licName = 'MS 365 E3' }
                 '*STANDARDPACK' { $licName = 'MS 365 E1' }
                 default { $licName = $license.Accountskuid.tostring() }
}

Leave the default line as it is just in case, but feel free to add anything else above it.