Cli-microsoft365: Bug report: error in the command 'spo tenant settings set'

Created on 27 Oct 2020  路  3Comments  路  Source: pnp/cli-microsoft365

Description

When we execute the command m365 spo tenant settings set --UserVoiceForFeedbackEnabled false, we are getting an error "Error: Field or property "_" does not exist."

Steps to reproduce

Run the command m365 spo tenant settings set --UserVoiceForFeedbackEnabled false.
The issue is not confining to the above mentioned property alone. It is there when we try to set any of the property available for spo tenant settings

Expected result

Set the value without any issue

Actual result

Getting the error. Error: Field or property "_" does not exist.
image

Environment

CLI Version : v3.2.0-beta.630901e
OS : Windows Cmder

More Information

This work well in the version _3.1.0_ without any issue.

image

bug work in progress

Most helpful comment

Some more information I can provide about the issue.

After the removal of Vorpal and simplifying the command validation, the args.options will have the value
_: [ 'spo', 'tenant', 'settings', 'set' ] along with user entered argument options.

This command loops through the options and add the information to the payload of the REST API _vti_bin/client.svc/ProcessQuery. Due to the presence of the extra argument options, this is getting failed.

Resolution needed

We need to give an extra condition in the argument looping to exempt if the argument has the key "_" and that should solve the problem.
image

I can take this up if you guys are fine with that.

All 3 comments

Some more information I can provide about the issue.

After the removal of Vorpal and simplifying the command validation, the args.options will have the value
_: [ 'spo', 'tenant', 'settings', 'set' ] along with user entered argument options.

This command loops through the options and add the information to the payload of the REST API _vti_bin/client.svc/ProcessQuery. Due to the presence of the extra argument options, this is getting failed.

Resolution needed

We need to give an extra condition in the argument looping to exempt if the argument has the key "_" and that should solve the problem.
image

I can take this up if you guys are fine with that.

Thank you for reporting @arjunumenon 馃憦馃徎

It's all yours 馃憤馃徎

Awesome catch @arjunumenon 馃憦

Was this page helpful?
0 / 5 - 0 ratings