Azure / Azure/azure-cli

Simple OData filter results in error

Open
#17,838 1 comment 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-identity-squad feature-request Graph
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**

I'm trying to use an OData filter to query Azure AD groups that start with a certain prefix. Executing the command results in the following error:

```
PS C:\Users\xxxxx> az ad group list --filter "startswith(displayName,'somePrefix')"
')' or ',' expected at position 33 in 'startswith(displayName,'somePrefix''.

C:\Users\xxxxx>echo Failed to load python executable.
Failed to load python executable.
C:\Users\xxxxx>exit /b 1
```

**To Reproduce**

Run the following command in PowerShell:

`az ad group list --filter "startswith(displayName,'somePrefix')"`

**Expected behavior**

I expect the command to return a list of AAD groups where the displayName starts with _somePrefix_

**Environment summary**

Azure CLI installed via MSI on Windows 10 Enterprise 1909
Azure CLI version 2.22.1
Using Azure CLI via PowerShell

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.