Forum Discussion
Trigger fabric data factory pipeline using python code
Hi Fabian,
Thank you for the detailed guidance. Following your instructions, I created a new security group in Azure and added the service principal as a member of this security group. After that, I was able to successfully access the workspace items using the following endpoints:
- GET: https://api.fabric.microsoft.com/v1/workspaces/
- GET: https://api.fabric.microsoft.com/v1/workspaces/<your WS Id>/items/<pipeline id>
However, when trying to access the pipeline run URL using the same token, I encountered the following error:
Pipeline run URL:
Error Message: {
"requestId": "f0bd2298-42f9-43d4-8c4b-1ffcf536c703",
"errorCode": "PrincipalTypeNotSupported",
"message": "The operation is not supported for the principal type"
}
I haven't yet added the Tenant.ReadWrite.All permission to the service principal, and my organization hasn't assigned me as a Fabric Administrator. However, I did attempt the process using a Fabric Administrator role account, and the issue persists. Could you please advise if there are any additional permissions or roles that need to be assigned to resolve this error?
Thank you in advance for your assistance.
Kind regards,
Punnam Srinivas
- charlyS1 year agoMost Valuable Professional
Hello,
Looks like you are trying to use Fabric API that does not support SPN authentication for the moment as mentioned here > https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api#known-limitations isn't it ?
Regards
- FabianSchut1 year agoSolution Sage
Hi PunnamSrinivas,
This particular API call is indeed not supported for a service principal: https://learn.microsoft.com/en-us/rest/api/fabric/core/job-scheduler/get-item-job-instance?tabs=HTTP#microsoft-entra-supported-identities.
You could try to run this in the Azure Cloud Shell: https://learn.microsoft.com/en-us/azure/cloud-shell/get-started/classic?tabs=azurecli and login with your account and see if that works.
- mandania1 year agoAdvocate II
hi Punnam Srinivas, did you manage to solve this? i am having a same issue as well.