2
votes

I'm trying to connect to Azure DevOps with a REST API request in Azure Data Factory V2. From Azure DevOps I want to collect information about the Work Items and store this in a data lake.

I use a REST linked service in ADF with AAD Service Principal Authentication. For this, I set up an App registration and granted the delegated permission to access Azure DevOps’ REST API. Both my App registration and ADF were assigned the Contributor role on the level of the subscription. API Permissions

The App registration’s client id, client secret and tenant id were filled in in the REST linked service and the connection is successful: REST linked service

However, the data I receive from the API is in HTML format, while the data I expect to receive should be in JSON format. Therefore, I assume that the authentication is still not correctly configured.

Error message

Is there maybe a permission that is not granted, or have I forgotten a step? Or is there another authentication method that would be a better fit for this case?

Thanks for your help and ideas on this matter!

1

1 Answers

0
votes

There seems to be nothing wrong with your REST linked service.

Here are some trouble shooting advices about your REST API for returning content in HTML format:

  1. Try using PostMan or other tools to invoke the REST API outside of the Azure Data Factory and see if you get the right results.

  2. Check your additionalHeaders.

  3. Note that REST connector only support response in JSON, so the content type of your REST API should be application/json.