microsoftgraph / microsoftgraph/entra-powershell

Filtering block throwing errors for Entra commands

Open
#732 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Investigating P3 PM ToTriage
Dominant language
PowerShell
Stars
213
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Customer feedback:

Error: Get-EntraUser: Cannot evaluate parameter 'Filter' because its argument is specified as a script block and there is no input. A script block cannot be evaluated without input.

Example:

PS C:\Program Files\PowerShell\Modules> get-entrauser -Filter {mail eq 'user@contoso'} | select-object userprincipalname
Get-EntraUser: Cannot evaluate parameter 'Filter' because its argument is specified as a script block and there is no input. A script block cannot be evaluated without input.

Working example:

PS C:\Program Files\PowerShell\Modules> get-entrauser -Filter "mail eq 'user@contoso.com'" | select-object userprincipalname

UserPrincipalName
----
user@contoso.com
Microsoft Graph PowerShell cmdlet example:
PS C:\Program Files\PowerShell\Modules> get-mguser -filter {mail eq 'user@contoso.com'} -property userprincipalname | select-object userprincipalname

UserPrincipalName
----
user@contoso

Contributor: @brvr-esko

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test path is named. Start by locating Get-EntraUser's Filter parameter handling and reproduce the script-block example, then compare it with the working string-filter and Microsoft Graph examples. Done means script-block filters work without the reported error while string filters continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.