Skip to main content

Sharepoint List

@twonines/sharepoint-listv2026.09.11.1· 1d agoMODELS
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, create_item, update_item, delete_item.

02Models1
@twonines/sharepoint-listv2026.09.11.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 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
bootstrap(infinite)— Device code flow authentication result
03Stats
A
100 / 100
Downloads
0
Archive size
34.1 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
  • License declared1/1earned
  • Verified public repository2/2earned
04Platforms
05Labels