Why ADF permission errors are easy to misdiagnose
Azure Data Factory permission errors have a specific property that makes them frustrating to debug: the Test Connection button in the portal can return success while the actual pipeline run fails with AuthorizationPermissionMismatch or Forbidden 403. This is not a bug — the connection test and the pipeline run use different security contexts, different integration runtimes, and sometimes different identities. What passes in one context can fail in the other.
The failure pattern shows up across ADLS Gen2, SharePoint Online, and Microsoft Fabric Lakehouses. The error message changes, but the root cause is almost always the same: the identity that the pipeline actually uses at runtime is missing a specific RBAC role or scope, and the test infrastructure masked that gap.
Understanding which identity the pipeline uses — System Assigned Managed Identity, a User Assigned Managed Identity, or a Service Principal — is the starting point for every permission investigation. If you diagnose the wrong identity from the start, every fix attempt will fail.
AuthorizationPermissionMismatch on ADLS Gen2
The most common ADF permission error on ADLS Gen2 storage is AuthorizationPermissionMismatch. The pipeline fails with this code when the ADF Managed Identity has the Contributor role on the Storage Account but not a data-plane role.
This is a frequently misunderstood split in Azure RBAC. The Contributor role on a Storage Account grants management-plane access — the ability to configure the account, manage keys, and set properties. It does not grant access to read or write blob data. That requires Storage Blob Data Contributor (for read/write) or Storage Blob Data Reader (for read only), assigned at the container or storage account scope.
Assigning the correct role via Azure CLI:
az role assignment create --assignee
To verify existing assignments: az role assignment list --assignee
After assigning the role, allow a few minutes for propagation before retesting. RBAC changes in Azure are eventually consistent and a test run immediately after the assignment may still fail.
401 on SharePoint Online: the wrong OAuth audience
ADF pipelines that call SharePoint Online or the Microsoft Graph API fail with a 401 error even when the bearer token is valid. The token is valid — it was issued correctly — but it was issued for the wrong audience. SharePoint Online requires a token scoped to the tenant-specific SharePoint endpoint, not to the general Microsoft Graph scope.
The fix is in the App Registration. The service principal or Managed Identity must have the permission https://
Before changing any ADF configuration, test the token and scope directly with Postman or the Azure CLI. A request to the SharePoint REST API with the correct tenant-scoped token should return 200. If it does, the problem is in which scope ADF is requesting; if it doesn't, the App Registration permissions need updating.
For SharePoint connectors, the Linked Service should reference the SharePoint site URL directly and use the tenant-specific scope, not the global Graph endpoint.
Permission denied from a notebook in a Fabric pipeline
Fabric pipeline notebooks that access a Lakehouse fail with permission denied errors because the pipeline does not automatically propagate its identity to the notebook context. A pipeline runs under the pipeline's service principal or Managed Identity. A notebook inside that pipeline runs under its own execution context, which is separate.
The fix is to grant the pipeline service principal Workspace Member or Workspace Contributor access on the target Fabric workspace that contains the Lakehouse. Read-only access is not enough for write operations — the role must match the intended operation.
This is a common source of confusion because a notebook that works when run interactively (as the user) fails when run from a pipeline (as the service principal). The notebook itself has no problem. The identity executing it does not have the required Lakehouse permissions.
For Fabric Copy Data tasks that fail intermittently on Lakehouse uploads, the cause is often the same: the service principal's token expires or loses context mid-run. Checking the workspace membership for the pipeline identity and ensuring it has a persistent, non-expiring role assignment resolves most intermittent authentication errors in this pattern.
Storage firewall blocking the Integration Runtime
When ADLS Gen2 has public network access disabled and the ADF pipeline uses the AutoResolveIntegrationRuntime (the shared Azure IR), the pipeline fails because the Azure IR's outbound IP is not in the storage firewall's allowed list.
The AutoResolveIntegrationRuntime uses dynamic IP ranges that rotate. Adding a static IP exception to the storage firewall is not feasible for this runtime. The correct solution is a Managed Virtual Network Integration Runtime with a Private Endpoint to the storage account.
In ADF Studio: Settings > Managed Virtual Network > Create Managed IR > add a Private Endpoint for the Azure Data Lake Storage Gen2 resource. After the private endpoint is approved on the storage side, the pipeline uses the private network path and bypasses the firewall entirely.
Missing this step is the most common reason why a pipeline works in development (where storage is often public) but fails in production (where storage is firewall-restricted). The connection test in the portal may show success if it runs from a different network context, which again masks the problem before the first production run.
ADF has two identities — check which one the pipeline actually uses
ADF resources have two distinct identity types that can be configured independently: a System Assigned Managed Identity, automatically created with the factory, and one or more User Assigned Managed Identities that are explicitly attached. A Linked Service can reference either one. If the Linked Service specifies User Assigned Managed Identity, the pipeline uses that identity — not the System Assigned one.
When troubleshooting, the first step is to find out which identity the failing Linked Service is configured to use. Open the Linked Service definition in ADF Studio and look at the authentication section. Copy the object ID or client ID, then use az role assignment list --assignee
A common mistake is assigning the correct role to the System Assigned Managed Identity while the Linked Service uses a User Assigned one, or vice versa. The assignment is on the correct scope but the wrong identity, so the pipeline fails and the role assignment appears correct when checked against the wrong identity.
Also verify that the integration runtime used in the Test Connection matches the one configured in the pipeline activity. AutoResolveIntegrationRuntime and a Managed Virtual Network IR use different network paths and, in some configurations, resolve credentials differently.
Data Factory Contributor: what it does and does not give you
A service principal managing ADF resources — creating pipelines, configuring Linked Services, deploying datasets — needs at minimum the Data Factory Contributor role on the resource group, not just on the factory itself.
Factory-level access allows managing resources within that factory. Resource group-level access is required to create or reference resources that live at the resource group scope (Key Vault references, storage accounts, integration runtimes in some configurations). This distinction is the source of failures where a service principal can view and edit existing pipelines but cannot create new Linked Services or reference new secrets.
For CI/CD pipelines deploying ADF resources, the service principal used for deployment needs Contributor at the resource group level plus Key Vault Secrets User on any Key Vault referenced by Linked Services. Scoping too tightly breaks deployments; scoping too broadly creates unnecessary security exposure. The minimum viable role combination for ADF CI/CD deployment is: Contributor on the resource group, Key Vault Secrets User on Key Vault, and Storage Blob Data Contributor on any storage accounts referenced by Linked Services.
When MetricSign surfaces the error code before you open the portal
ADF pipeline failures are detected by MetricSign via the ADF REST API runs endpoint. When a pipeline fails, MetricSign creates a pipeline_failed incident that includes the exact error message from the activity details — including AuthorizationPermissionMismatch and the specific resource that rejected the request.
Without this, the workflow is: wait for a stakeholder to notice a missing report update, log into Power BI Service, find the dataset, find the refresh that failed, open ADF, navigate to Monitor, find the right pipeline run, click into the activity detail, and read the error. The error code that would have told you it was a permission problem in thirty seconds takes fifteen minutes to surface.
Surfacing the error code at alert time does not fix the permission problem, but it eliminates the time spent ruling out unrelated causes before you get to the actual fix.