Tony Anderson
Tony Anderson

Reputation: 39

How can I use this API in Azure Data Factory

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. enter image description here

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

Answers (1)

Joy Wang
Joy Wang

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.

enter image description here

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.

enter image description here

After adding it, check it in the Role assignments , it should be like below.

enter image description here

Upvotes: 2

Related Questions