Forum Discussion
Access or Trigger Pipeline using Fabric Rest API and Token Generation
- 1 year ago
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
The "scp" section is missing.
okay, so how to add that?
- lbendlin1 year ago
Super User
Redo you app registration. Don't use delegated permissions.
- ChristinaODT1 year agoFrequent Visitor
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.
- Anonymous1 year agoNot applicable
This is what I found. What you have in the scope of Service Principal doesnt matter. But the scope in the context of rest api should be defined when you are requesting the access token.
The below settings worked out for me. I used PowerShell to place the API call as postman is blocked in my organization. But it should work regardless of the tool you try. In my case, I included the "Scope" as "https://analysis.windows.net/powerbi/api/.default", which will give you access to all Fabric rest APIs. Also note the URL used while requesting the access token.
$RequestAccessTokenUri = "https://login.microsoftonline.com/$TenantId/oauth2/v2.0/token"
$Resource = "https://analysis.windows.net/powerbi/api/.default"
$Body = @{
grant_type="client_credentials"
client_id=$ClientId
client_secret=$ClientSecret
scope=$Resource
}