Reputation: 39
I want to use this API as a Web module in Azure Data Factory [https://learn.microsoft.com/en-us/rest/api/datafactory/pipelineruns/querybyfactory
But it required me to get a bearer Token first in Authorization.
I'm try to set up a token request first in this link but no help. Any guidance is appreciated https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc
Upvotes: 2
Views: 2679
Reputation: 42043
No need to use the bearer token manually, you can use the MSI
Authentication in your screenshot directly.
Navigate to your subscription or ADFv2 in the portal -> Access control (IAM)
-> Add
-> Add role assignment
-> search for the name of your ADFv2 and add it as an Owner/Contributor
role in the subscription. Then the MSI of your ADFv2 will be able to call the rest api.
Update:
Add the MSI like below, for exampple, my ADFv2 named joyfactory
, just add the MSI with the same name as an Owner
or Contributor
.
After adding it, check it in the Role assignments
, it should be like below.
Upvotes: 2