Skip to content

Conversation

cnotin
Copy link
Contributor

@cnotin cnotin commented Oct 14, 2025

Try it for yourself:

> Get-MgUser -Filter "userType ne 'Guest'"
Get-MgUser_List: Unsupported or invalid query filter clause specified for property 'userType' of resource 'User'.

Contrary to "eq" that works:

> Get-MgUser -Filter "userType eq 'Guest'"

DisplayName            Id                                   Mail                                UserPrincipalName
-----------            --                                   ----                                -----------------
<results>

Important

The following guidance is for Microsoft employees only. Community contributors can ignore this message; our content team will manage the status.

After you've created your PR, expand this section for tips and additional instructions.
  • do not merge is the default PR status and is automatically added to all open PRs that don't have the ready to merge label.
  • Add the ready for content review label to start a review. Only PRs that have met the minimum requirements for content review and have this label are reviewed.
  • If your content reviewer requests changes, review the feedback and address accordingly as soon as possible to keep your pull request moving forward. After you address the feedback, remove the changes requested label, add the review feedback addressed label, and select the Re-request review icon next to the content reviewer's alias. If you can't add labels, add a comment with #feedback-addressed to the pull request.
  • After the content review is complete, your reviewer will add the content review complete label. When the updates in this PR are ready for external customers to use, replace the do not merge label with ready to merge and the PR will be merged within 24 working hours.
  • Pull requests that are inactive for more than 6 weeks will be automatically closed. Before that, you receive reminders at 2 weeks, 4 weeks, and 6 weeks. If you still need the PR, you can reopen or recreate the request.

For more information, see the Content review process summary.

Try it for yourself:
```
> Get-MgUser -Filter "userType ne 'Guest'"
Get-MgUser_List: Unsupported or invalid query filter clause specified for property 'userType' of resource 'User'.
```

Contrary to "eq" that works:
```
> Get-MgUser -Filter "userType eq 'Guest'"

DisplayName            Id                                   Mail                                UserPrincipalName
-----------            --                                   ----                                -----------------
<results>
```
Copy link

Learn Build status updates of commit cec867e:

⚠️ Validation status: warnings

File Status Preview URL Details
api-reference/v1.0/resources/user.md ⚠️Warning Details

api-reference/v1.0/resources/user.md

  • Line 2, Column 8: [Warning: duplicate-titles - See documentation] Title 'user resource type - Microsoft Graph v1.0' is duplicated in: 'v1.0/resources/intune-devices-user.md(2,8), v1.0/resources/intune-mam-user.md(2,8), v1.0/resources/intune-onboarding-user.md(2,8), v1.0/resources/intune-troubleshooting-user.md(2,8), v1.0/resources/user.md(2,8)'. Titles must be unique within a docset.
  • Line 13, Column 1: [Warning: duplicate-h1s - See documentation] H1 'user resource type' is duplicated with other articles: 'v1.0/resources/intune-devices-user.md(11,1), v1.0/resources/intune-mam-user.md(11,1), v1.0/resources/intune-onboarding-user.md(11,1), v1.0/resources/intune-troubleshooting-user.md(11,1), v1.0/resources/user.md(13,1)'. First level headings must be unique within a docset.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@FaithOmbongi FaithOmbongi self-assigned this Oct 15, 2025
@FaithOmbongi FaithOmbongi added the area: Entra APIs and issues relating to Microsoft Entra (previously Azure AD) features. label Oct 15, 2025
@FaithOmbongi
Copy link
Contributor

Hi @cnotin - The query only works with advanced query capabilities. Be sure to add $count=true parameter and ConsistencyLevel header set to true. See Support for filter by properties of Microsoft Entra ID (directory) objects.

image

LMK if this resolves the issue.

@FaithOmbongi FaithOmbongi added area: query parameters Issues and PRs relating to OData query parameters supported in Microsoft Graph. needs author feedback Waiting for author (creator) of issue to provide more info labels Oct 15, 2025
@cnotin
Copy link
Contributor Author

cnotin commented Oct 16, 2025

You are totally right! It works indeed. Apologies and thank you for the quick response :)

@cnotin cnotin closed this Oct 16, 2025
@cnotin cnotin deleted the patch-3 branch October 16, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Entra APIs and issues relating to Microsoft Entra (previously Azure AD) features. area: query parameters Issues and PRs relating to OData query parameters supported in Microsoft Graph. needs author feedback Waiting for author (creator) of issue to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants