Appearance
Function: getListsEval()
ts
function getListsEval(
ctx: Context,
token: string,
options: {
siteId: string;
}): Promise<any>;Defined in: src/ms-graph/sharepointGraphEval.ts:495
Get all lists from a SharePoint site via the Graph API (browser eval variant).
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The SDK context. |
token | string | Access token from getSharePointTokenUserAuth. |
options | { siteId: string; } | The site identifier. |
options.siteId | string | The SharePoint site ID. |
Returns
Promise<any>
An array of list objects.
Example
ts
const token = await getSharePointTokenUserAuth(ctx, authProps);
const lists = await getListsEval(ctx, token, {
siteId: 'contoso.sharepoint.com,abc123,def456',
});
lists.forEach((list: any) => console.log(list.displayName));