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

AzureCredentialsFactory.FromUserAssigedManagedServiceIdentity 方法

定义

使用来自本地托管服务标识终结点的令牌创建凭据对象。

public Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials FromUserAssigedManagedServiceIdentity (string clientId, Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.MSIResourceType resourceType, Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment environment, string tenantId = default);
member this.FromUserAssigedManagedServiceIdentity : string * Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.MSIResourceType * Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment * string -> Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials
Public Function FromUserAssigedManagedServiceIdentity (clientId As String, resourceType As MSIResourceType, environment As AzureEnvironment, Optional tenantId As String = Nothing) As AzureCredentials

参数

clientId
String

用户分配的标识客户端 ID

resourceType
MSIResourceType

MSI 登录信息的资源类型

environment
AzureEnvironment

要进行身份验证的环境

tenantId
String

租户 ID

返回

经过身份验证的凭据对象

适用于