Appearance
Function: getLists()
ts
function getLists(client: Client, options: {
siteId: string;
}): Promise<any>;Defined in: src/ms-graph/sharepointGraph.ts:74
Get all lists from a SharePoint site.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | The Microsoft Graph client instance. |
options | { siteId: string; } | The site identifier. |
options.siteId | string | The SharePoint site ID. |
Returns
Promise<any>
An array of SharePoint lists.
Example
ts
const client = await getMsGraphClient(creds);
const lists = await getLists(client, { siteId: 'contoso.sharepoint.com,abc123,def456' });
console.log('Lists:', lists.map((l: any) => l.displayName));