Skip to content

Commit

Permalink
improve GroupAssignments
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolonsky committed Jul 29, 2020
1 parent af06206 commit b81f59e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AzureADLicensing/AzureADLicensing.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ function Get-AADGroupLicenseAssignment {
$request = Invoke-WebRequest -Method Get -Uri $($baseUrl + "AccountSkus/GroupAssignments?accountSkuID=$($sku.accountSkuId)&nextLink=&searchText=&sortOrder=undefined") -Headers $(Get-AuthToken)
$requestContent = $request | ConvertFrom-Json

$licensedGroups = $requestContent.items | Select-Object objectId, displayName

$rep += [PSCustomObject]@{
Name = $sku.Name
LicensedGroups = $requestContent.items
AccountSkuId = $sku.accountSkuId
LicensedGroups = $licensedGroups
}
}

Expand Down

0 comments on commit b81f59e

Please sign in to comment.