microsoftgraph / msgraph-cli-archived

The Microsoft Graph CLI repository has moved. This repository is now an archive.
https://github.com/microsoftgraph/msgraph-cli
Other
44 stars 9 forks source link

Output of a query expression in table format does not include a null result #119

Closed fey101 closed 2 years ago

fey101 commented 3 years ago

Describe the bug When you query results using the JMESPath format, and select output as table, if the property of the object is null, the result is displayed without that column included. Seems to work as expected in default json output format. As per JMESPath, "Unlike a projection, the result of the expression in always included, even if the result is a null". The output in table format contradicts this.

To Reproduce Steps to reproduce the behavior:

mg users user list --query "[?jobTitle=='Salesperson'].{name: displayName, email: mail}" --output table
Expected behavior Expected output Name Email
Bianca Pisani null
Cameron White null
instead of Name
Bianca Pisani
Cameron White

Screenshots image

AB#9543