Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hello experts, I've been reading documentation about how to trigger a pipeline run by using a Fabric REST API, but i find myself in a loophole. I'm confident i can find the soultion in this forum.
I've created an app registration and given Item.ReadWrite.All and Workspace.ReadWrite.All permissions. Also generated the secret client value. But, when i try to generate the token through a get https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token in Postman, with scope "https://analysis.windows.net/powerbi/api/.default" a token is generated and when i try to run the pipeline through the API URL i get an error message: "PrincipalTypeNotSupported". I use a jobType=Pipeline
Solved! Go to Solution.
Does this resource work for you: https://learn.microsoft.com/en-us/azure/cloud-shell/get-started/classic?tabs=powershell? You can run the commands that I have given in the previous post after you've set up the Azure Cloud Shell with PowerShell as your choice of shell environment. With the first command, you should login with a user that has access to the pipeline you want to trigger. The second command should be a bit adjusted with your id's.
Hi @mebg123
Thank you very much tackytechtom for your thoughtful reply.
Can you tell me if your problem is solved? If yes, please accept it as solution.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mebg123 ,
It might be the scope that is making up something here. Can you try it with "https://api.fabric.microsoft.com"?
Here are two blog articles that might be helping you 🙂
https://www.tackytech.blog/how-to-call-fabric-rest-apis-from-fabric-data-pipelines/
https://www.tackytech.blog/how-to-call-power-bi-rest-apis-from-fabric-data-pipelines/
Let me know, how it goes!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Thanks @tackytechtom ! I can retrieve the token from the scope "https://api.fabric.microsoft.com", but when i try to execute the post statement in Postman i get the same error "PrincipalTypeNotSupported".
There where a few things that i was missing that those two blogs helped me, like adding the connection from the app registration in Fabric, so i could replicate your example in the blog post. Thanks!
But what i want to do is to be able to trigger a pipeline from a web (in this case, a localhost). Is this possible? Microsoft has some documentation about this (Job Scheduler - Run On Demand Item Job - REST API (Core) | Microsoft Learn) but i can't seem to replicate it.
Hm interesting...
I actually got the same error when I wrote those articles. If you take a look here and scroll down right above the third bullet, I am mentioning that matter as well.
https://www.tackytech.blog/how-to-call-fabric-rest-apis-from-fabric-data-pipelines/#set-up-a-new-con...
With that said the article is from last year and things change ridiculously quickly so this information might already be outdated.
In the documentation you linked to, it does say though that the call is not (yet) supported with service principals. I'd suggest you fetch a token with your Entra ID user and see whether this works. Though I would not recommend this for production use, you can at least see whether your approach works at all like fetching the correct token and using the correct API syntax etc.
I know this is not a proper solution, but maybe it is still of some help...
Good Luck!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
I tried to change it as you suggest but haven't been able to trigger the pipeline. I'm trying to do so as the documentation I linked in my previous response, using the same format, but it turns out the same error "PrincipalTypeNotSupported".
Although I can retrieve the name of the pipeline i want to trigger, but what i can't seem to be able to do is to actually trigger it.
If there's more information about this issue, I'll be grateful
Hi @mebg123,
As @tackytechtom mentioned, you are not able to run this specific API with Service Principals. Instead of creating a token with https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token in Postman, you should use PowerShell or Azure Cloud Shell and connect to PowerBI/Fabric with
Connect-PowerBIServiceAccount
With that same Shell, run the following command:
Invoke-PowerBIRestMethod -Method post -Url https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/jobs/instances?jobType={jobType}
Thanks, can i get a little bit more context on how to use Powershell with Fabric? Thanks!
Does this resource work for you: https://learn.microsoft.com/en-us/azure/cloud-shell/get-started/classic?tabs=powershell? You can run the commands that I have given in the previous post after you've set up the Azure Cloud Shell with PowerShell as your choice of shell environment. With the first command, you should login with a user that has access to the pipeline you want to trigger. The second command should be a bit adjusted with your id's.
Sorry i missed out. Due to some restrictions I can't use the Shell method. Alternatively, I managed to trigger the pipeline by invoking powerBIAccessToken in the developer console while signed in the Fabric platform. This token did work, while the Principal type did not.
Is there a way to achieve this by using a post or get method?
Thanks
You may achieve this by using "grant_type = password" in the API post request, instead of using "grant_type = client_credentials". You should give your username and password in the request, and is therefore not recommended at all. Furthermore, if you have MFA enabled, this will not work. But if you are aware of the risks and have no other option, you could try this.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
2 |