Skip to main content

Sharepoint List

@twonines/sharepoint-listv2026.09.22.1· 2mo agoBEHAVIORS
01README

SharePoint list items via the Microsoft Graph API — read and write rows on the list surface (/sites/{site}/lists/...), not the document library. Authenticates as an Entra public client through the device code flow, so there is no client secret, and every call runs as the signed-in user. Methods: bootstrap, list_lists, get_list, list_items, list_changes, create_item, update_item, delete_item. list_changes diffs a list against a baseline it keeps itself, so it reports what moved column by column rather than which rows were merely touched.

02Behaviors1
@twonines/sharepoint-listv2026.09.22.1mod.ts

Global Arguments

ArgumentTypeDescription
tenantIdstringEntra tenant GUID (e.g. aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee)
clientIdstringAzure public client app registration ID
refreshTokenstringOAuth2 refresh token obtained via bootstrap. Re-run bootstrap if expired.
siteHostPathstringGraph site locator in host:path form, e.g. contoso.sharepoint.com:/sites/Clients
scopesstringSpace-separated delegated scopes. Default includes Sites.ReadWrite.All;
fn bootstrap()
Authenticate via device code flow. Displays a user code and
fn list_lists(includeHidden: boolean, maxPages: number)
Enumerate the lists on the configured site. Start here — the output
ArgumentTypeDescription
includeHiddenbooleanInclude hidden/system lists (Form Templates, Style Library, and the like)
maxPagesnumberCap on @odata.nextLink pages followed
fn get_list(list: string, includeHidden: boolean, maxPages: number)
Fetch one list's column definitions. Run this before writing:
ArgumentTypeDescription
liststringList GUID, URL name, or display name
includeHiddenbooleanInclude hidden columns in the output
maxPagesnumberCap on @odata.nextLink pages followed
fn list_items(list: string, filter?: string, orderBy?: string, select?: string, top: number, maxPages: number)
Fetch items from a list, with column values expanded. Supports OData
ArgumentTypeDescription
liststringList GUID, URL name, or display name
filter?stringOData $filter over fields, e.g. fields/Status eq 'Open'.
orderBy?stringOData $orderby, e.g. fields/Created desc
select?stringComma-separated internal column names to return; omit for all columns
topnumberPage size requested from Graph
maxPagesnumberCap on @odata.nextLink pages followed
fn list_changes(list: string, scopeColumn?: string, scopeValue?: string, filter?: string, trackFields?: array, ignoreFields: array, contextFields: array, summarizeColumn?: string, updateBaseline: boolean, top: number, maxPages: number)
What changed on a list since this method last ran. Diffs the list
ArgumentTypeDescription
liststringList GUID, URL name, or display name
scopeColumn?stringInternal column name to scope the watch to, e.g. Status or
scopeValue?stringValue scopeColumn must equal, matched exactly. Omit both to watch
filter?stringExtra OData $filter, ANDed with the scope, e.g.
trackFields?arrayInternal column names to diff, to the exclusion of all others.
ignoreFieldsarrayInternal column names to add to the ignored set — for a column
contextFieldsarrayInternal column names whose current values ride along on every
summarizeColumn?stringInternal column name to count the current population by, reported
updateBaselinebooleanWhether a clean run replaces the baseline. False shows the same
topnumberPage size requested from Graph. Larger than list_items' default
maxPagesnumberCap on @odata.nextLink pages followed. A walk that hits this has
fn create_item(list: string, fields: record)
Create one list item. Fields are keyed by INTERNAL column name — run
ArgumentTypeDescription
liststringList GUID, URL name, or display name
fieldsrecordColumn values keyed by internal name, e.g. {"Title":"New row","Status":"Open"}
fn update_item(list: string, itemId: string, fields: record)
Update one list item's fields (PATCH — only the columns you pass are
ArgumentTypeDescription
liststringList GUID, URL name, or display name
itemIdstringList item ID (from list_items output)
fieldsrecordColumn values to set, keyed by internal name. Unlisted columns are left alone.
fn delete_item(list: string, itemId: string, confirm: boolean)
Delete one list item. Requires confirm=true. The item's field values
ArgumentTypeDescription
liststringList GUID, URL name, or display name
itemIdstringList item ID (from list_items output)
confirmbooleanMust be true. Guards against a delete run with the wrong itemId.

Resources

lists(15m)— Lists on the configured SharePoint site
listSchema(15m)— One list's column definitions — the internal names writes must use
listItems(15m)— Items from a SharePoint list
itemWrite(infinite)— Result of a create, update, or delete against a single list item
listChanges(infinite)— What changed on one list since the previous list_changes run — rows
listBaseline(infinite)— The population and column values as of the last clean list_changes
bootstrap(infinite)— Device code flow authentication result
03Previous Versions1
2026.09.11.1
04Stats
A
93 / 100
Downloads
31
Archive size
64.3 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License1/2partial

    no SPDX license declared

  • Verified public repository2/2earned
05Platforms
06Labels