Share via


ShareClientBuilderExtensions.AddFileServiceClientWithCredential<TBuilder> Method

Definition

Registers a ShareServiceClient instance with the provided serviceUri and the token credential configured using the client factory builder's UseCredential method.

Note that service-level operations do not support token credential authentication. This extension exists to allow the construction of a ShareServiceClient that can be used to derive a ShareClient that has token credential authentication.

Also note that ShareTokenIntent is currently required for token authentication.

public static Azure.Core.Extensions.IAzureClientBuilder<Azure.Storage.Files.Shares.ShareServiceClient,Azure.Storage.Files.Shares.ShareClientOptions> AddFileServiceClientWithCredential<TBuilder> (this TBuilder builder, Uri serviceUri) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential;
static member AddFileServiceClientWithCredential : 'Builder * Uri -> Azure.Core.Extensions.IAzureClientBuilder<Azure.Storage.Files.Shares.ShareServiceClient, Azure.Storage.Files.Shares.ShareClientOptions> (requires 'Builder :> Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential)
<Extension()>
Public Function AddFileServiceClientWithCredential(Of TBuilder As IAzureClientFactoryBuilderWithCredential) (builder As TBuilder, serviceUri As Uri) As IAzureClientBuilder(Of ShareServiceClient, ShareClientOptions)

Type Parameters

TBuilder

Parameters

builder
TBuilder
serviceUri
Uri

Returns

Applies to