Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have recently created, microsoft data fabric trail account with 60 day trail.
And under this trail account, I am trying to invoke microsoft data fabric data pipeline using Postman/from some external client.
Based on the docuementation(i.e. https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api#obtain-an-authorization-toke...), I tried to optain the token with below curl:
curl --location 'https://login.microsoftonline.com/tanentId/oauth2/v2.0/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=myclientId' \
--data-urlencode 'client_secret=mysecret' \
--data-urlencode 'scope=https://api.fabric.microsoft.com/.default' \
--data-urlencode 'grant_type=client_credentials'
I get the token, but when i am using the same token to rigger the pipline using below curl. but i get 401 error with message "The caller is not authenticated to access this resource". please help how can i proceed.
curl --location --request POST 'https://api.fabric.microsoft.com/v1/workspaces/myworkspaceid/items/mypiplelineid/jobs/instances?jobType=Pipeline' \
--header 'Authorization: Bearer <token>' \
--data ''
Thanks.
Solved! Go to Solution.
@munnas - The API that you use to trigger a Fabric Data Pipeline does not support Service Principals. You have to use a named user account & password. They will be bringing service pricipal support to more API's in the future.
It does work with Username/Password as we are able to do that within our Company. It will eventually work in Power Automate but since the API does not return a response the HTTP Post with Azure Entra (preauthorized) does not function properly.
There is another thread in the community that goes into more detail. It's fairly recent.
Jeremy
You can take a look at this topic: https://community.fabric.microsoft.com/t5/Data-Pipeline/How-to-trigger-an-on-demand-run-to-a-pipelin...
@munnas - The API that you use to trigger a Fabric Data Pipeline does not support Service Principals. You have to use a named user account & password. They will be bringing service pricipal support to more API's in the future.
It does work with Username/Password as we are able to do that within our Company. It will eventually work in Power Automate but since the API does not return a response the HTTP Post with Azure Entra (preauthorized) does not function properly.
There is another thread in the community that goes into more detail. It's fairly recent.
Jeremy
@jwinchell40 thanks for the response. could you please some example how you are able to trigger the datapipleline.
@munnas - Sorry for the delay; I will ask our Dev Team to share the snippet from our web app. They are on Holiday; so it may not be until Monday/Tuesday next week.
You can take a look at this topic: https://community.fabric.microsoft.com/t5/Data-Pipeline/How-to-trigger-an-on-demand-run-to-a-pipelin...
Did you add the service principal to access the workspace where the data pipeline is in with sufficient permissions? You do not need any application permissions as shown in the screenshot. Also make sure that your service principal is able to run REST APIs. This can be set in the Power BI (Fabric) admin settings.
I have already configured the application under Microsoft Entra ID (https://entra.microsoft.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade).
Below is a screenshot showing the application permissions that were added. Since microsoft fabric was not available, I added application permissions for the Power BI service instead.
Thanks.
Since microsoft fabric was not available, I added application permissions for the Power BI service instead.
I would call this the "money tree approach". You may want to investigate if there are Fabric specific permissions, either already implemented or planned.
Evaluate your token at jwt.io most likely you have misconfigured the application scope. Don't use delegated permissions.
User | Count |
---|---|
4 | |
3 | |
2 | |
2 | |
1 |
User | Count |
---|---|
7 | |
4 | |
3 | |
3 | |
3 |