I’m working on creating reports for assigned Microsoft licenses in our AAD. Basically what we need is to grab DisplayName, UserPrincipalName, Company and whatever licenses are assigned to the user.
I found this script: Export Office 365 User License Report With PowerShell that I’ve modified a bit to get proper encoding, delimiters and other more cosmetic changes.
A problem is that we use the Company property in our AD/AAD for billing purposes, but that property seems to not be exposed via the
Get-MsolUser cmdlet. The
Get-AzureADUser cmdlet seems to expose this property, but
Get-AzureADUser does not support the same switches for license management as
Is there a reasonable way to get licensing information with the use of the AzureAD (preview) module, or do I have to go via the
MsOlService module, and if so can I combine the two modules in a clever way to get the properties I need.