Power BI Refresh Error:
Fabric Pipeline Error 4122
What does this error mean?
A request to Azure Machine Learning failed because the credential in the connection is invalid or does not have sufficient permissions for the requested operation. Authentication succeeded but authorization was denied.
Common causes
- 1The service principal or managed identity lacks the required RBAC role on the Azure Machine Learning workspace
- 2The credential stored in the Fabric connection is incorrect (wrong secret, wrong tenant ID, or wrong client ID)
- 3The AzureML workspace was moved to a different resource group or subscription, invalidating scoped permissions
- 4The service principal was recently removed from the AzureML workspace access control list
How to fix it
- 1Step 1: Open the Azure Machine Learning workspace in the Azure portal and navigate to Access Control (IAM) to verify the service principal or managed identity has an appropriate role (e.g., Contributor or AzureML Data Scientist).
- 2Step 2: Confirm the credential values in the Fabric AzureML Service connection (client ID, tenant ID, secret/certificate) exactly match the registered app in Azure Active Directory.
- 3Step 3: If the workspace was recently reorganized, re-assign the required RBAC roles at the new resource scope.
- 4Step 4: Update the Fabric connection with corrected credential details if any values are wrong.
- 5Step 5: Re-run the pipeline and verify the specific operation (shown in '%operation;') completes successfully.