Skip to content

Commit

Permalink
3.3.3
Browse files Browse the repository at this point in the history
Fixed displayName missing bug
  • Loading branch information
Micke-K committed Dec 14, 2021
1 parent bc48d14 commit 5534eb3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
29 changes: 2 additions & 27 deletions Extensions/MSGraph.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -515,7 +491,7 @@ function Add-GraphObectProperties
[Array]
$property = $null,
[Array]
$exclude,
$exclude = $null,
$SortProperty = "displayName")

if($property -isnot [Object[]]) { $property = @('displayName', 'description', 'id')}
Expand Down Expand Up @@ -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))
{
Expand Down
7 changes: 7 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release Notes

## 3.3.3 - 2021-12-15

**Fixes**

- Fixed issue where displayName was missing in object list<br />
Thank you Jason!

## 3.3.2 - 2021-12-14

**New features**
Expand Down

0 comments on commit 5534eb3

Please sign in to comment.