Skip to content

'spo list get' command returns PrincipalType as number instead of human readable string #3379

@nanddeepn

Description

@nanddeepn

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.

image

This can be improved to show the enum names.
image

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions