Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Manager is not returned from Get-PnPAzureADUser #3939

Open
2 of 6 tasks
kingy444 opened this issue May 7, 2024 · 1 comment
Open
2 of 6 tasks

[BUG] - Manager is not returned from Get-PnPAzureADUser #3939

kingy444 opened this issue May 7, 2024 · 1 comment
Labels
bug Something isn't working reproduced Issue reproduced after testing

Comments

@kingy444
Copy link

kingy444 commented May 7, 2024

Reporting an Issue or Missing Feature

When running the below command the Manager value is empty. The equivelent Get-MgUser command returns the manager value
Get-PnPAzureADUser -Select Manager -Identity $Identity

Expected behavior

The details of the Manager (ideally including at least the GUID) is returned

Actual behavior

The field is returned under AdditionalProperties, but the property is empty

Steps to reproduce behavior

$Identity = ""
$PnPUser = Get-PnPAzureADUser -Select Manager -Identity $Identity 
$PnPUser.AdditionalProperties

What is the version of the Cmdlet module you are running?

2.4.0 and Powershell 7.2

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@kingy444 kingy444 added the bug Something isn't working label May 7, 2024
@veronicageek veronicageek added the reproduced Issue reproduced after testing label May 8, 2024
@wilecoyotegenius
Copy link
Contributor

Fixing this would require making changes in PnP.Framework - PnP.Framework.Graph.UsersUtility.ListUsers method.
Essentially, the issue is that manager is returned only once you add $expand=manager to the query (adding $select is not enough).
I will look at this in my spare time and provide a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproduced Issue reproduced after testing
Projects
None yet
Development

No branches or pull requests

3 participants