diff --git a/Extensions/MSGraph.psm1 b/Extensions/MSGraph.psm1 index b7425cf..b7516db 100644 --- a/Extensions/MSGraph.psm1 +++ b/Extensions/MSGraph.psm1 @@ -481,31 +481,7 @@ function Get-GraphObjects $retObjects = $graphObjects } - return (Add-GraphObectProperties $retObjects $objectType $property $SortProperty) - - $objects = @() - - foreach($graphObject in $retObjects) - { - $params = @{} - if($property) { $params.Add("Property", $property) } - if($exclude) { $params.Add("ExcludeProperty", $exclude) } - foreach($objTmp in ($graphObject | Select-Object @params)) - { - $objTmp | Add-Member -NotePropertyName "IsSelected" -NotePropertyValue $false - $objTmp | Add-Member -NotePropertyName "Object" -NotePropertyValue $graphObject - $objTmp | Add-Member -NotePropertyName "ObjectType" -NotePropertyValue $objectType - $objects += $objTmp - } - } - $property = "IsSelected",$property - - if($objects.Count -gt 0 -and $SortProperty -and ($objects[0] | GM -MemberType NoteProperty -Name $SortProperty)) - { - $objects = $objects | sort -Property $SortProperty - } - - $objects + return (Add-GraphObectProperties $retObjects $objectType $property $exclude $SortProperty) } function Add-GraphObectProperties @@ -515,7 +491,7 @@ function Add-GraphObectProperties [Array] $property = $null, [Array] - $exclude, + $exclude = $null, $SortProperty = "displayName") if($property -isnot [Object[]]) { $property = @('displayName', 'description', 'id')} @@ -544,7 +520,6 @@ function Add-GraphObectProperties $objects += $objTmp } } - $property = "IsSelected",$property if($objects.Count -gt 0 -and $SortProperty -and ($objects[0] | GM -MemberType NoteProperty -Name $SortProperty)) { diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 9608a05..7ed7daa 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,12 @@ # Release Notes +## 3.3.3 - 2021-12-15 + +**Fixes** + +- Fixed issue where displayName was missing in object list
+ Thank you Jason! + ## 3.3.2 - 2021-12-14 **New features**