Appearance
Function: getSiteId()
ts
function getSiteId(client: Client, options: {
domain: string;
site: string;
}): Promise<any>;Defined in: src/ms-graph/sharepointGraph.ts:21
Get the site ID from the SharePoint Graph API.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | The Microsoft Graph client instance. |
options | { domain: string; site: string; } | The domain and site name. |
options.domain | string | The SharePoint domain. |
options.site | string | The SharePoint site name. |
Returns
Promise<any>
The site ID string.
Example
ts
const client = await getMsGraphClient(creds);
const siteId = await getSiteId(client, { domain: 'contoso.sharepoint.com', site: 'ProjectAlpha' });
console.log('Site ID:', siteId);