Jun 29 2020
02:32 PM
- last edited on
Jan 14 2022
04:30 PM
by
TechCommunityAP
Jun 29 2020
02:32 PM
- last edited on
Jan 14 2022
04:30 PM
by
TechCommunityAP
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
Jun 29 2020 11:21 PM
SolutionIt's either that, or querying the Graph API directly.
Jun 30 2020 08:32 AM
@VasilMichev - 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.
May 24 2023 02:18 PM
In case anyone is still searching for an answer to this in 2023:
get-mggroup -Property AssignedLicenses | Where-Object {$_.AssignedLicenses}
...should do the trick.
Jun 29 2020 11:21 PM
SolutionIt's either that, or querying the Graph API directly.