Skip to content

[Enhancement]: Get current SP user #5513

@milanholemans

Description

@milanholemans

Currently, the command spo user get can only get users by id, userName, email. One of these 3 options must be provided.

I think we should make all 3 options optional. If no option is specified we return the current user.

Example

Get the current logged-in user

m365 spo user get --webUrl https://contoso.sharepoint.com/sites/project-x

API request

GET https://contoso.sharepoint.com/sites/project-x/_api/web/currentuser

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions