Skip to content

Enhancement: allow to get list item by UniqueID #4631

Description

@martinlingstuyl

Currently you can only get list items by id:

https://pnp.github.io/cli-microsoft365/cmd/spo/listitem/listitem-get/

However, it's also possible to retrieve them by UniqueId, which is handy in some situations.
It can be done by calling the following endpoint:

https://contoso.sharepoint.com/sites/Project-x/_api/Web/Lists('GUID')/GetItemByUniqueId('GUID')

Options

Option Description
-i, --id [id] ID of the item to retrieve. Specify either id or uniqueId but not both.
--uniqueId [uniqueId] The Unique ID (GUID) of the item to retrieve. Specify either id or uniqueId but not both.

Examples

Get an item by its Unique ID

m365 spo listitem get --listTitle "Demo List" --uniqueId "64dc28c4-3c43-45f6-ba66-307d9eb7e6aa" --webUrl https://contoso.sharepoint.com/sites/project-x

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions