Reputation: 1149
I'm attempting to use the following to obtain a list of pipelines using an activity in ADF.
GET "https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.DataFactory/factories//pipelines?api-version=2018-06-01"
I've setup a web activity to do this and have overcome the authorisation issues, however the JSON being returned doesn't seem to contain any "values" for the pipelines (or datasets if I choose to do so that way).
This is my output in ADF:
{
"value": [],
"ADFWebActivityResponseHeaders": {
"Pragma": "no-cache",
"x-ms-correlation-request-id": "3760f8b9-498c-464b-8f61-1ccaa004ad7d",
"x-ms-ratelimit-remaining-subscription-reads": "11998",
"x-ms-request-id": "3760f8b9-498c-464b-8f61-1ccaa004ad7d",
"x-ms-routing-request-id": "UKSOUTH:20220519T132708Z:3760f8b9-498c-464b-8f61-1ccaa004ad7d",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"Cache-Control": "no-cache",
"Date": "Thu, 19 May 2022 13:27:07 GMT",
"Server": "Kestrel",
"Content-Length": "17",
"Content-Type": "application/json; charset=utf-8",
"Expires": "-1"
},
"effectiveIntegrationRuntime": "AutoResolveIntegrationRuntime (UK South)",
"executionDuration": 0,
"durationInQueue": {
"integrationRuntimeQueue": 1
},
"billingReference": {
"activityType": "ExternalActivity",
"billableDuration": [
{
"meterType": "ManagedVNetIR",
"duration": 0.016666666666666666,
"unit": "Hours"
}
]
}
}
Any assistance as to why its not returning anything would be fantastic, I'm currently using GIT and branches also so unsure if that would be having an impact.
Upvotes: 0
Views: 737
Reputation: 2764
I have tried in my environment and got the same error :
I solved this error by adding a Manage identity as a contributor. Go to Azure Portal ->Resource group -> Access Control (IAM) -> Add Role assignment.
Syntax:
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}?api-version=2018-06-01
Adding the roles sometimes takes more time to refresh. So make sure to refresh the pipeline.
Reference:
https://learn.microsoft.com/en-us/rest/api/datafactory/pipelines/get#code-try-0
Upvotes: 0