Skip to content

Get-MgUser call with -Property "UserType" doesn't return UserType #3329

Open
@Panoone

Description

@Panoone

Describe the bug

When I make a Get-MgUser call, I'm unable to return a value for UserType even when I explicitly include it.

Making the same request using Invoke-MgGraphRequest returns the property correctly.

Expected behavior

The MgGraph user call should return the value.

How to reproduce

Execute Get-MgUser call with -Property "UserType".
No value is returned.

SDK Version

Graph v2.22.0

Latest version known to work for scenario above?

Unkown

Known Workarounds

Use Invoke-MgGraphRequest.

e.g.

$uri = "https://graph.microsoft.com/v1.0/users/$($member.Id)$select=displayName,userPrincipalName,userType,mail"
$user = Invoke-MgGraphRequest -Method GET -Uri $uri

Debug output

Click to expand log ```
</details>


### Configuration

Name                           Value                                                                                      
----                           -----                                                                                      
PSVersion                      5.1.14393.8062                                                                             
PSEdition                      Desktop                                                                                    
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                    
BuildVersion                   10.0.14393.8062                                                                            
CLRVersion                     4.0.30319.42000                                                                            
WSManStackVersion              3.0                                                                                        
PSRemotingProtocolVersion      2.3                                                                                        
SerializationVersion           1.1.0.1  


### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions