共用方式為


BaseRequestExtensions.WithPerRequestAuthProvider<T>(T) Method

Definition

Sets the PerRequestAuthProvider delegate handler to the default Authentication Middleware Handler to authenticate a single request. The PerRequestAuthProvider delegate handler must be set to the GraphServiceClient instance before using this extension method otherwise, it defaults to the default authentication provider. This only works with the default authentication handler. If you use a custom authentication handler, you have to handle it's retrieval in your implementation.

public static T WithPerRequestAuthProvider<T> (this T baseRequest) where T : Microsoft.Graph.IBaseRequest;
static member WithPerRequestAuthProvider : 'T -> 'T (requires 'T :> Microsoft.Graph.IBaseRequest)
<Extension()>
Public Function WithPerRequestAuthProvider(Of T As IBaseRequest) (baseRequest As T) As T

Type Parameters

T

Parameters

baseRequest
T

The BaseRequest for the request.

Returns

T

Applies to