你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TelemetryConfiguration.SetAzureTokenCredential(Object) Method

Definition

Set a TokenCredential for this configuration.

public void SetAzureTokenCredential(object tokenCredential);
member this.SetAzureTokenCredential : obj -> unit
Public Sub SetAzureTokenCredential (tokenCredential As Object)

Parameters

tokenCredential
Object

An instance of Azure.Core.TokenCredential.

Exceptions

An ArgumentException is thrown if the provided object does not inherit Azure.Core.TokenCredential.

Remarks

For more information on expected types, review the documentation for the Azure.Identity library. (https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/identity/Azure.Identity).

Applies to