你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AzureCredentialsFactory.FromDevice 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
通过设备流创建凭据对象。
public Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials FromDevice (string clientId, string tenantId, Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment environment, Func<Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult,bool> deviceCodeFlowHandler = default);
member this.FromDevice : string * string * Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment * Func<Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult, bool> -> Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials
Public Function FromDevice (clientId As String, tenantId As String, environment As AzureEnvironment, Optional deviceCodeFlowHandler As Func(Of DeviceCodeResult, Boolean) = Nothing) As AzureCredentials
参数
- clientId
- String
应用程序的客户端 ID
- tenantId
- String
租户 ID 或域
- environment
- AzureEnvironment
要进行身份验证的环境
- deviceCodeFlowHandler
- Func<Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult,Boolean>
用于处理设备流的用户定义的函数
返回
经过身份验证的凭据对象