Get all license groups

Occasional Contributor

I am looking for a way to get all AzureAD groups that assign licenses using the AzureAD Powershell module. "Get-AzureADGroup" lacks the licensing detail. 


I know that "Get-MsolGroup -All | Where {$_.Licenses}", but we don't want to leverage the MsolService. module unless we absolutely have to. 


Thank you

2 Replies
best response confirmed by Jeff Lamb (Occasional Contributor)

It's either that, or querying the Graph API directly.

@Vasil Michev - Thanks for the reply. That's what I was afraid of. We want to authenticate with a service principal, which the MSOL module doesn't seem to support. I will pursue a graph query.