spo user list [options]
Lists all the users within specific web
| Option | Description |
| ----------------------- | ----------------------------------------- |
| -u, --webUrl <webUrl> | Url of the web to list the users within|
| -o, --output [output] | Output type. json,text. Default text |
| --verbose | Runs command with verbose logging |
| --debug | Runs command with debug logging |
Gets list of users for web _https://contoso.sharepoint.com/sites/mysite_
spo user list --webUrl "https://contoso.sharepoint.com/sites/mysite"
GET https://contoso.sharepoint.com/sites/mysite/_api/web/SiteUsers
Get-PnPUser -
https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpuser?view=sharepoint-ps
Shouldn't we use spo site user list instead? First, it would allow us to put the command next to other site-related commands. Second, we typically use singular noun so that we don't have issues with other verb like get, add or remove which support a single entity.
@waldekmastykarz I changed to spo web users list , but I am thinking of also spo users list naming since when you specify a --webUrl and it is the spo namespace so kind of says what it does without we explicitly specify web. This is how it is named in PnP PowerShell Get-PnPUser.
Personally, I find Get-PnPUser pretty ambiguous. To me, it doesn't communicate the intent and you need to get to the docs/help to understand what you can do with it.
You might be right here. First, I thought it would make more sense to make it explicit that the command applies to site/web. But then, looking at our other commands, like list or field, they're not qualified with site/web either, so perhaps we should after all use your original idea and not use web/site in the name to stay consistent with all other commands that we already have. Sorry for the trouble 馃槉
@VelinGeorgiev ... I am almost done with other spo user get command, I can take this up too... can you please assign to me?
Before starting this, I will submit PR of #1673 for a quick review as this was my command :)
All yours Siddharth @siddharth-vaghasia. Thanks for your help!