Skip to content

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

ParameterTypeDescription
clientClientThe Microsoft Graph client instance.
options{ domain: string; site: string; }The domain and site name.
options.domainstringThe SharePoint domain.
options.sitestringThe 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);

Matterway Assistant SDK Documentation