Skip to main content

Get SharePoint list items

Read the items of a SharePoint list as a Data Table, optionally filtered by field values or a filter, and limited to some columns.

Command in the Microsoft 365 toolkit · id ooa.microsoft365/get_list_items · 10 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialNoMicrosoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token. Not needed with a SharePoint site session.
SiteStringNoSharePoint site: site id, or hostname:/sites/path such as contoso.sharepoint.com:/sites/Finance.
ListStringYesList id or display name.
FilterStringNoOData filter on fields, e.g. fields/Status eq 'Open'.
ColumnsListNoField names to return; all when empty.
Maximum resultsNumberNo1000Maximum items.
Endpoint addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.
Use display namesBooleanNofalseName the table's columns as people see them in SharePoint (Status, not Status0 or field_1); columns may then be given that way too.
SessionStringNoA SharePoint site signed in to with Sign in to SharePoint site (also on premises); when given, access_token and site are not used (G3).
MatchDictionaryNoOnly items whose fields have these values, all of them (G3); combined with filter when both are given.

Outputs​

OutputTypeWhat it is
tableTableColumn id, then one column per list field (named as people see them when use_display_names is on).
countNumberNumber of items.