AadHttpClientFactory class

Returns a preinitialized version of the AadHttpClient for a given resource url. For more information: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the AadHttpClientFactory class.

Properties

serviceKey

The service key for AadHttpClientFactory.

Methods

getClient(resourceEndpoint)

Returns an instance of the AadHttpClient that communicates with the current tenant's configurable Service Principal.

Property Details

serviceKey

The service key for AadHttpClientFactory.

static readonly serviceKey: ServiceKey<AadHttpClientFactory>;

Property Value

ServiceKey<default>

Method Details

getClient(resourceEndpoint)

Returns an instance of the AadHttpClient that communicates with the current tenant's configurable Service Principal.

getClient(resourceEndpoint: string): Promise<AadHttpClient>;

Parameters

resourceEndpoint
string

The target AAD application's resource endpoint.

Returns

Promise<default>