@kwiz/common
Version:
KWIZ common utilities and helpers for M365 platform
17 lines (16 loc) • 944 B
TypeScript
import { SPFxAuthTokenType } from "../../types/auth";
export declare function GetTokenAudiencePrefix(appId: string): string;
export declare function GetDefaultScope(appId: string): string;
export declare function GetMSALSiteScope(hostName: string): string;
export declare function GetGraphEndpointUrl(): string;
export declare function GetMSALAdminConsentUrl(params: {
clientId: string;
redirectUri: string;
/** use common if not provided */
tenantId?: string;
state?: string;
}): string;
/** Acquire an authorization token for a Outlook, Graph, or SharePoint the same way SPFx clients do */
export declare function GetSPFxClientAuthToken(siteUrl: string, spfxTokenType?: SPFxAuthTokenType): Promise<string>;
/** Acquire an authorization token for a Outlook, Graph, or SharePoint the same way SPFx clients do */
export declare function GetSPFxClientAuthTokenSync(siteUrl: string, spfxTokenType?: SPFxAuthTokenType): string;