AzureCredentialsFactory.FromDevice Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a credentials object through device flow.
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
Parameters
- clientId
- String
the client ID of the application
- tenantId
- String
the tenant ID or domain
- environment
- AzureEnvironment
the environment to authenticate to
- deviceCodeFlowHandler
- Func<Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult,Boolean>
a user defined function to handle device flow
Returns
an authenticated credentials object
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.
Azure SDK for .NET