次の方法で共有


MSGraphClientFactory class

MSGraphClient の初期化済みバージョンを返します。 詳しくは、https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph をご覧ください

注釈

このクラスのコンストラクターは、内部にマークされています。 サードパーティのコードは、コンストラクターを直接呼び出したり、MSGraphClientFactory クラスを展開するサブクラスを作成したりすることはできません。

プロパティ

serviceKey

MSGraphClientFactory のサービス キー。

メソッド

getClient(version)

現在のテナントの構成可能なサービス プリンシパルと通信するバージョン 3 の MSGraphClient V3 のインスタンスを返します。

getClientWithMiddleware(version, options)

現在のテナントの構成可能なサービス プリシパルと通信する MSGraphClient のインスタンスを返します。 カスタム ミドルウェア オプションを指定できます。

プロパティの詳細

serviceKey

MSGraphClientFactory のサービス キー。

static readonly serviceKey: ServiceKey<MSGraphClientFactory>;

プロパティ値

メソッドの詳細

getClient(version)

現在のテナントの構成可能なサービス プリンシパルと通信するバージョン 3 の MSGraphClient V3 のインスタンスを返します。

getClient(version: '3'): Promise<MSGraphClientV3>;

パラメーター

version

'3'

戻り値

Promise<MSGraphClientV3>

getClientWithMiddleware(version, options)

現在のテナントの構成可能なサービス プリシパルと通信する MSGraphClient のインスタンスを返します。 カスタム ミドルウェア オプションを指定できます。

getClientWithMiddleware(version: '3', options: ClientOptions): Promise<MSGraphClientV3>;

パラメーター

version

'3'

使用するGraph APIのバージョン。 3。

options
@microsoft/microsoft-graph-client!ClientOptions:interface

Graph APIのクライアント オプション。

戻り値

Promise<MSGraphClientV3>