Skip to content

Bug report: Issue when executing spo listitem list with a filter value #4090

@MathijsVerbeeck

Description

@MathijsVerbeeck

Description

When executing spo listitem list and adding a value to the option filter, for example Title eq 'Test', I get the following error:
Error: The expression "Title eq ''Test''" is not valid.

I noticed that the single quote that I add in the filter option is doubled. I've had a quick look in the code and noticed that this makes sense, as the formatting.encodeQueryParameter replaces all the occurences of a single quote to a double quote. (see snippet below)
image

Steps to reproduce

  1. Execute the command m365 spo listitem list --webUrl {webUrl} --listTitle 'Test' --filter "Title eq 'Test'"

Expected results

List of items with 'Test' as title

Actual results

Error: The expression "Title eq ''Test''" is not valid.

CLI for Microsoft 365 version

v6.0.0

nodejs version

v16.13.0

Operating system (environment)

Windows

Shell

PowerShell

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions