Skip to content

New command: spo user get #1673

@VelinGeorgiev

Description

@VelinGeorgiev

Usage

spo user get [options]

Description

Gets a site user within specific web

Options

Option Description
-u, --webUrl <webUrl> Url of the web to list the user within
--email [email] Email of the site user to get
--id [id] Id of the site user to get
--loginName [loginName] Login name of the site user to get
-o, --output [output] Output type. json,text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Notes

Use either 'email', 'id' or 'loginName', but not all.

Example

Gets user with email [email protected] for web https://contoso.sharepoint.com/sites/mysite

spo user get --webUrl "https://contoso.sharepoint.com/sites/mysite" --email "[email protected]"

Gets user with id 5 for web https://contoso.sharepoint.com/sites/mysite

spo user get --webUrl "https://contoso.sharepoint.com/sites/mysite" --id 5

Gets user with loginName i:0#.f|membership|[email protected] for web https://contoso.sharepoint.com/sites/mysite

spo user get --webUrl "https://contoso.sharepoint.com/sites/mysite" --loginName "i:0#.f|membership|[email protected]"

Rest APIs reference

GET https://contoso.sharepoint.com/_api/web/siteusers/GetByEmail('[email protected]')
GET https://contoso.sharepoint.com/_api/web/siteusers/GetById(14)
GET https://contoso.sharepoint.com/_api/web/siteusers/GetByLoginName('i%3A0%23.f%7Cmembership%7Cvelin.georgiev%tenant.onmicrosoft.com')

Additional Information

Get-PnPUser -
https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpuser?view=sharepoint-ps

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions