microsoftgraph/msgraph-cli-archived

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

Closed this issue · 0 comments

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