microsoft / EntraExporter

PowerShell module to export a local copy of an Entra (Azure AD) tenant configuration.
https://aka.ms/EntraExporter
MIT License
568 stars 89 forks source link

Enhancement: User Manager Export #42

Open roflrolle opened 1 year ago

roflrolle commented 1 year ago

Currently the users manager is not included in the export. This is because the manager is not part of the default properties of a user object (see: https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-beta#properties)

It would help to have to the users manager in the export to view hierarchical data.

mahalel commented 4 months ago

I think if we'd expand the manager instead of extensions on this line, we'd get the data we need https://github.com/microsoft/EntraExporter/blob/afc222908513efbf5d5c35d8a3e7ed4b1a1dfbda/src/Get-EEDefaultSchema.ps1#L840C1-L840C76

I'm not sure if this expand can be perhaps parameterized so we can choose which field to expand ourselves? The limitation is that we cannot have multiple attributes passed to expand - https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#expand-parameter