Sharepoint List
@twonines/sharepoint-listv2026.09.11.1
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.
02Models
@twonines/sharepoint-listv2026.09.11.1mod.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| tenantId | string | Entra tenant GUID (e.g. aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee) |
| clientId | string | Azure public client app registration ID |
| refreshToken | string | OAuth2 refresh token obtained via bootstrap. Re-run bootstrap if expired. |
| siteHostPath | string | Graph site locator in host:path form, e.g. contoso.sharepoint.com:/sites/Clients |
| scopes | string | Space-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
| Argument | Type | Description |
|---|---|---|
| includeHidden | boolean | Include hidden/system lists (Form Templates, Style Library, and the like) |
| maxPages | number | Cap on @odata.nextLink pages followed |
fn get_list(list: string, includeHidden: boolean, maxPages: number)
Fetch one list's column definitions. Run this before writing:
| Argument | Type | Description |
|---|---|---|
| list | string | List GUID, URL name, or display name |
| includeHidden | boolean | Include hidden columns in the output |
| maxPages | number | Cap 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
| Argument | Type | Description |
|---|---|---|
| list | string | List GUID, URL name, or display name |
| filter? | string | OData $filter over fields, e.g. fields/Status eq 'Open'. |
| orderBy? | string | OData $orderby, e.g. fields/Created desc |
| select? | string | Comma-separated internal column names to return; omit for all columns |
| top | number | Page size requested from Graph |
| maxPages | number | Cap on @odata.nextLink pages followed |
fn create_item(list: string, fields: record)
Create one list item. Fields are keyed by INTERNAL column name — run
| Argument | Type | Description |
|---|---|---|
| list | string | List GUID, URL name, or display name |
| fields | record | Column 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
| Argument | Type | Description |
|---|---|---|
| list | string | List GUID, URL name, or display name |
| itemId | string | List item ID (from list_items output) |
| fields | record | Column 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
| Argument | Type | Description |
|---|---|---|
| list | string | List GUID, URL name, or display name |
| itemId | string | List item ID (from list_items output) |
| confirm | boolean | Must 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