Description
Error thrown when attempting to use a Caml query to return a list items from a list.
Steps to reproduce
Execute a command using a CAML query as per the documentation.
m365 spo listitem list -t "List Title" -u "https://teannt.sharepoint.com/sites/site" --query "<View><Query><Where><IsNull><FieldRef Name='InternalName' /></IsNull></Where></Query></View>"
Expected result
Returns items from list and does not error
Actual result
Error is thrown
(node:61) UnhandledPromiseRejectionWarning: LexerError: Unknown character:/
at Lexer.tokenize (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/node_modules/jmespath/jmespath.js:295:31)
at Parser._loadTokens (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/node_modules/jmespath/jmespath.js:511:30)
at Parser.parse (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/node_modules/jmespath/jmespath.js:496:16)
at Object.search (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/node_modules/jmespath/jmespath.js:1659:25)
at Function.logOutput (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/dist/Utils.js:114:37)
at UI._pipeFn (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/dist/index.js:104:32)
at UI.log (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/node_modules/vorpal/dist/ui.js:436:48)
at Session.session._log (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/node_modules/vorpal/dist/session.js:93:24)
at Session.session.log (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/node_modules/vorpal/dist/session.js:78:20)
at CommandInstance.log (/home/cli-microsoft365/.npm-global/lib/node_modules/@pnp/cli-microsoft365/node_modules/vorpal/dist/command-instance.js:94:26)
(node:61) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:61) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Environment
Docker: m365pnp/climicrosoft365:next (v3.3.0-beta.dfa0e21)
Shell: pwsh
Description
Error thrown when attempting to use a Caml query to return a list items from a list.
Steps to reproduce
Execute a command using a CAML query as per the documentation.
Expected result
Returns items from list and does not error
Actual result
Error is thrown
Environment
Docker: m365pnp/climicrosoft365:next (v3.3.0-beta.dfa0e21)
Shell: pwsh