Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ChristinaODT
Frequent Visitor

Access or Trigger Pipeline using Fabric Rest API and Token Generation

Hi,

 

I am trying to run a fabric pipeline using rest api. 

For this i created a Microsoft Entra App on azure portal with desired permissions that include workspace readwrite, datapipeline execute and read write. I added the app owner as me. In the fabric portal, i give access 'Service principals can use Fabric APIs'

 

Then i generate access token with the scope 'https://fabric.microsoft.com/.default' with successfully generated the token. Now when i am trying to use this token in the apis its throws invalid token error. 

Intitially i am tring to get pipelines of workspace using this  api - https://api.fabric.microsoft.com/v1/workspaces/<WS ID>/dataPipelines

I tried running pipeline as well - https://api.fabric.microsoft.com/v1/workspaces/<WS ID>/items/<Pipeline id>/jobs/instances?jobType=Pipeline

 

I am attaching all the screenshot. I am really looking for something useful as i tried everything from my side.

 

Screenshot 2025-01-04 211520.png

 

 

Screenshot 2025-01-04 211602.png

 

Screenshot 2025-01-04 211618.png

1 ACCEPTED SOLUTION

No nothing works out. I tried everything shared and worked as per the API document given by Microsoft, but the API did not hit the pipelines. Though I found out an alternative approach to make this feature work . I will share the blog link soon here for others facing the same issue

View solution in original post

23 REPLIES 23
v-veshwara-msft
Community Support
Community Support

Hi @ChristinaODT ,

We haven’t heard from you since our last response and wanted to check if your issue has been resolved. If so, please consider marking the helpful reply as the solution to assist others in the community.

If you found an alternative solution, we’d appreciate it if you could share it here to help others facing a similar issue.

Should you need further assistance, feel free to reach out.

Looking forward to your response.

Best regards,
Vinay

Salini1991
Frequent Visitor

Did it work? I am facing the same issue when I call https://api.fabric.microsoft.com/v1/workspaces. I am now getting 

{
"requestId": "b9c63b6d-27f3-42a3-a2d9-d733a6ebe20d",
"errorCode": "Unauthorized",
"message": "The caller is not authenticated to access this resource"
}
v-veshwara-msft
Community Support
Community Support

Hi @ChristinaODT ,

Thanks for sharing your query. We just wanted to check if the issue has been resolved and whether any of the solutions provided met your requirements. If so, please consider marking the helpful replies as solutions. If you were able to resolve it through a different approach, kindly share the details here, it could benefit others facing similar challenges.

If you're still experiencing issues, please reach out.
For reference, please go through this thread to see if it provides any additional insights:
Solved: Re: Unable to trigger fabric data pipeline using R... - Microsoft Fabric Community

For reference, you may also check the Known Limitations of the Fabric Data Pipeline REST API.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.

Best Regards,
Vinay kumar.

No nothing works out. I tried everything shared and worked as per the API document given by Microsoft, but the API did not hit the pipelines. Though I found out an alternative approach to make this feature work . I will share the blog link soon here for others facing the same issue

Hi @ChristinaODT ,
As we haven’t heard back from you in a while, so just following up to check if your query has been resolved. If possible, please share the alternative approach or the blog link here, as it could be helpful for others facing a similar issue.

Or if you found any of the responses helpful, please consider marking those as Accepted Solution to help others find the answer easily.
Thank you.

SachinNandanwar
Super User
Super User

 You have a keyword "Bearer" in the token. If you are using POSTMAN then it is not required.

SachinNandanwar_0-1736064584950.png



Regards,
Sachin
Check out my Blog

It will still work in postman if you use "Bearer" in the token...

I tried without Bearer still giving me the same error

Are you using "https://fabric.microsoft.com/.default" scope?

SachinNandanwar_0-1736066817012.png

Ths scopes endpoint should be this "https://api.fabric.microsoft.com/.default" instead.



Regards,
Sachin
Check out my Blog

I already tried with this as well..same error

Does the service principal has any access to the workspace ? Contributor/Member/Viewer ?



Regards,
Sachin
Check out my Blog

Yes, contributor access given

lbendlin
Super User
Super User

i created a Microsoft Entra App on azure portal with desired permissions that include workspace readwrite

did you choose "delegated"  permissions?

Yes it is delegated but i tried with Grant admin consent as wellScreenshot 2025-01-05 140030.pngScreenshot 2025-01-05 140052.png

Check the validity of the token at jwt.io

This is what i am gettingScreenshot 2025-01-06 112721.png

The "scp" section is missing.

okay, so how to add that?

Redo you app registration. Don't use delegated permissions.

Sorry but i am little unclear. When i am adding permissions in app, persmissions such as datapipeline execute, readwrite comes under delegated permission. In the other one, i am getting only tenant readwrite. Can you give me step by step process to achieve this or any reference.

Helpful resources

Announcements
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

Check out the July 2025 Fabric update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.