Appearance
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
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The SDK context. |
token | string | Access token from getSharePointTokenUserAuth. |
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 token = await getSharePointTokenUserAuth(ctx, authProps);
const siteId = await getSiteIdEval(ctx, token, {
domain: 'contoso.sharepoint.com',
site: 'ProjectAlpha',
});
console.log('Site ID:', siteId);