我在哪里可以找到 "authenticationKey" Azure 应用程序中用于创建 "ClientCredential" 对象的值

Where can I find "authenticationKey" value in azure application for creating "ClientCredential" object

我想使用 Azure 数据工厂将数据从 Azure Blob 传输到 Azure SQL 数据库。 我发现这个 link : Copy data from Azure Blob to Azure SQL Database using Azure Data Factory

编辑: 我需要连接到我的 Azure 订阅以创建数据工厂和管道。

我的问题是找到 "authenticationKey" 的值。

string authenticationKey = "<your authentication key for the application>";

我需要创建一个 "ClientCredential" 如下代码:

// Authenticate and create a data factory management client
var context = new AuthenticationContext("https://login.windows.net/" + tenantID);
ClientCredential cc = new ClientCredential(applicationId, authenticationKey);
AuthenticationResult result = 
context.AcquireTokenAsync("https://management.azure.com/", cc).Result;
ServiceClientCredentials cred = new TokenCredentials(result.AccessToken);
var client = new DataFactoryManagementClient(cred) { SubscriptionId = subscriptionId };

您可以在下图中看到我在 azure 中的应用程序注册。

基本上,您的身份验证密钥是您在 Active Directory 中注册的应用程序的密钥。

请在此处找到有关如何检索您的 secret/authentication 密钥的详细信息。