通过Web Service获取ADF管道/数据集列表失败问题求助
I’ve run into similar scenarios before, so let’s break down the most likely causes for your empty pipeline list—especially considering your Git integration setup:
1. Git Branch vs. Published ADF Service Mismatch
This is the most common culprit when using Git with ADF. The Azure Management API you’re calling (Microsoft.DataFactory/factories/pipelines) returns resources that are published to the Data Factory service instance, not the draft content stored in your Git branch.
- If you’ve only created/modified pipelines in your Git branch but haven’t published them to the ADF service, the API will return an empty
valuearray. - To fix this: Go to your ADF Authoring UI, switch to your working branch, validate your resources, and click Publish All to push changes to the service. Wait a few minutes for the publish to complete, then re-run your Web Activity.
2. Invalid API URL Parameters
Double-check your GET request URL for missing or incorrect values. Your original URL has double slashes (//) where placeholders should be—make sure you replace them with actual values:
https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.DataFactory/factories/{adf-name}/pipelines?api-version=2018-06-01
- Ensure
{subscription-id},{resource-group-name}, and{adf-name}are filled with your real resource details. Empty or incorrect placeholders might lead the API to target an invalid resource, returning an empty array instead of a clear error. - Test the URL directly in Postman or Azure CLI first to confirm it returns the expected pipelines before using it in Web Activity.
3. Permission Scope Verification
Even if you resolved basic authorization, confirm your service principal (or identity used for Web Activity) has the specific permission to read pipelines:
- The required action is
Microsoft.DataFactory/factories/pipelines/read. - Ensure this permission is assigned at the Data Factory resource level (or higher, like resource group/subscription) via an Azure RBAC role (e.g.,
Data Factory Contributoror a custom role with this action). - Note: The
Readerrole at the subscription level should include this permission, but double-check if there are any deny assignments blocking access.
4. Validate Pipeline Existence in Target ADF
Rule out the obvious: Confirm the target Data Factory actually has published pipelines.
- Go to the Azure Portal, navigate to your ADF instance, and check the Pipelines section under Author & Monitor (make sure you’re viewing the published environment, not your Git branch draft).
- Alternatively, run this Azure CLI command to list pipelines directly:
az datafactory pipeline list --resource-group <your-rg> --factory-name <your-adf>
If this command returns an empty list, the issue is with your ADF’s published resources, not the Web Activity call.
5. API Version Check
While api-version=2018-06-01 is a stable, supported version for ADF pipelines, you can try reusing the same version to eliminate edge cases. The latest stable version for this API is still 2018-06-01, so this is less likely to be the issue, but it’s worth confirming.
内容的提问来源于stack exchange,提问作者Lynchie

