Description
Initiated from discussion here pnp/script-samples#295 (comment) by @Adam-it
The spo list get command when used with --withPermissions option, returns the PrincipalType as a number.

This can be improved to show the enum names.

Steps to reproduce
Execute below command:
m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/Demo --withPermissions
Expected results
PrincipalType should be returned as enum name.
Actual results
PrincipalType is returned as a number.
Diagnostics
No response
CLI for Microsoft 365 version
v5.3.0
nodejs version
16.13.0
Operating system (environment)
Windows
Shell
PowerShell
cli doctor
No response
Additional Info
We are handling the situation in spo file sharinginfo get command by introducing an FileSharingPrincipalType enum
We can have this enum as a generic enum for all spo related commands.
Description
Initiated from discussion here pnp/script-samples#295 (comment) by @Adam-it
The spo list get command when used with
--withPermissionsoption, returns thePrincipalTypeas a number.This can be improved to show the enum names.

Steps to reproduce
Execute below command:
m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/Demo --withPermissions
Expected results
PrincipalTypeshould be returned as enum name.Actual results
PrincipalTypeis returned as a number.Diagnostics
No response
CLI for Microsoft 365 version
v5.3.0
nodejs version
16.13.0
Operating system (environment)
Windows
Shell
PowerShell
cli doctor
No response
Additional Info
We are handling the situation in spo file sharinginfo get command by introducing an FileSharingPrincipalType enum
We can have this enum as a generic enum for all spo related commands.