Get-MgDirectoryObject/Get-MgDirectoryObjectByID (and Beta versions) only return id
and DeletedDateTime
properties.
#2550
Labels
id
and DeletedDateTime
properties.
#2550
Describe the bug
The documentation for these cmdlets suggests it's as simple as using syntax such as:
However, this simply returns e.g.:
Attempting to select e.g.
displayName
property only just returns:And if you try to use
-ExpandProperty
:Even using the suggested
-BodyParameter
switch with a hashtable of parameters makes no difference e.g.:To Reproduce
Steps to reproduce the behavior:
Install-Module Microsoft.Graph
Import-Module Microsoft.Graph
Install-Module Microsoft.Graph.DirectoryObjects
Import-Module Microsoft.Graph.DirectoryObjects
Connect-MgGraph
Expected behavior
I expect more fields to be displayed by default and also to be directly accessible - consider the response to directly calling the API endpoint via
Invoke-MgGraphRequest
:Debug Output
You can see that the attribute values are in the response from the API but that the cmdlet will not expose them. I know this may potentially be covered by the following in the documentation/help:
However there isn't a clear example and the documentation here is very poor.
Module Version
Environment Data
The text was updated successfully, but these errors were encountered: