Description
Some of our commands return values wrapped in a value object, others return the values without it. Most likely all of our list commands use the value implementation.
Steps to reproduce
Use m365 spo user list --webUrl https://contoso.sharepoint.com/ --output json and the response is
{
"value": [
{
"Id": 7,
"LoginName": "i:0#.f|membership|[email protected]",
"Title": "Garth North",
"PrincipalType": 1,
"Email": "[email protected]",
"IsEmailAuthenticationGuestUser": false,
"IsShareByEmailGuestUser": false,
"IsSiteAdmin": true,
"UserId": {
"NameId": "xxxx",
"NameIdIssuer": "urn:federation:microsoftonline"
},
"UserPrincipalName": "[email protected]"
},
{
"Id": 2,
"LoginName": "i:0#.f|membership|[email protected]",
"Title": "Admin",
"Email": "[email protected]",
"Expiration": "",
"IsEmailAuthenticationGuestUser": false,
"IsShareByEmailGuestUser": false,
"IsSiteAdmin": true,
"UserId": {
"NameId": "xxxx",
"NameIdIssuer": "urn:federation:microsoftonline"
},
"UserPrincipalName": "[email protected]"
}
]
}
Expected result
All results return a consistent response when using the --output json. Should be something we fix for v4 of the CLI as this will be a breaking change.
Description
Some of our commands return values wrapped in a
valueobject, others return the values without it. Most likely all of our list commands use thevalueimplementation.Steps to reproduce
Use
m365 spo user list --webUrl https://contoso.sharepoint.com/ --output jsonand the response is{ "value": [ { "Id": 7, "LoginName": "i:0#.f|membership|[email protected]", "Title": "Garth North", "PrincipalType": 1, "Email": "[email protected]", "IsEmailAuthenticationGuestUser": false, "IsShareByEmailGuestUser": false, "IsSiteAdmin": true, "UserId": { "NameId": "xxxx", "NameIdIssuer": "urn:federation:microsoftonline" }, "UserPrincipalName": "[email protected]" }, { "Id": 2, "LoginName": "i:0#.f|membership|[email protected]", "Title": "Admin", "Email": "[email protected]", "Expiration": "", "IsEmailAuthenticationGuestUser": false, "IsShareByEmailGuestUser": false, "IsSiteAdmin": true, "UserId": { "NameId": "xxxx", "NameIdIssuer": "urn:federation:microsoftonline" }, "UserPrincipalName": "[email protected]" } ] }Expected result
All results return a consistent response when using the
--output json. Should be something we fix for v4 of the CLI as this will be a breaking change.