Skip to content

Function: getSiteIdEval()

ts
function getSiteIdEval(
   ctx: Context, 
   token: string, 
   options: {
  domain: string;
  site: string;
}): Promise<any>;

Defined in: src/ms-graph/sharepointGraphEval.ts:151

Get the site ID for a domain and site name via the Graph API (browser eval variant).

Parameters

ParameterTypeDescription
ctxContextThe SDK context.
tokenstringAccess token from getSharePointTokenUserAuth.
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 token = await getSharePointTokenUserAuth(ctx, authProps);
const siteId = await getSiteIdEval(ctx, token, {
  domain: 'contoso.sharepoint.com',
  site: 'ProjectAlpha',
});
console.log('Site ID:', siteId);

Matterway Assistant SDK Documentation