microsoftgraph / microsoftgraph/entra-powershell
Filtering block throwing errors for Entra commands
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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