我正在尝试从自动运行ADF管道。NET。能够创建一个客户端,当我尝试执行以下操作时,请致电
var pipeline = client.Pipelines.Get(resourceGroup, dataFactoryName, "test_1");
我得到的错误是Microsoft。Rest.Azure.CloudException:"无法检索文档,因为它不存在。">
完整代码如下:
// Authenticate and create a data factory management client
IConfidentialClientApplication app = ConfidentialClientApplicationBuilder.Create(applicationId)
.WithAuthority("https://login.microsoftonline.com/" + tenantID)
.WithClientSecret(authenticationKey)
.WithLegacyCacheCompatibility(false)
.WithCacheOptions(CacheOptions.EnableSharedCacheOptions)
.Build();
AuthenticationResult result = await app.AcquireTokenForClient(new string[] { "https://management.azure.com//.default" }).ExecuteAsync();
ServiceClientCredentials cred = new TokenCredentials(result.AccessToken);
DataFactoryManagementClient client = new DataFactoryManagementClient(cred)
{
SubscriptionId = subscriptionId
};
看起来这是一个愚蠢的错误。我试图从这里访问的管道被另一个进程删除,因此此调用失败。