@microsoft/teamsfx-react
Version:
React helper functions for Microsoft TeamsFx
20 lines • 873 B
TypeScript
import { Data } from "./useData";
import { TeamsUserCredential } from "@microsoft/teamsfx";
import { Client } from "@microsoft/microsoft-graph-client";
type GraphOptionWithCredential = {
scope?: string[];
credential?: TeamsUserCredential;
};
/**
* Helper function to call Microsoft Graph API with authentication.
*
* @param fetchGraphDataAsync - async function of how to call Graph API and fetch data.
* @param options - Authentication configuration and OAuth resource scope.
* @returns data, loading status, error and reload function
*
* @deprecated This package will be deprecated by 2026-07.
* @public
*/
export declare function useGraphWithCredential<T>(fetchGraphDataAsync: (graph: Client, credential: TeamsUserCredential, scope: string[]) => Promise<T>, options?: GraphOptionWithCredential): Data<T>;
export {};
//# sourceMappingURL=useGraph.d.ts.map