Patterson
Patterson

Reputation: 2805

Azure Data Factory Http request failed with client error, status code 400 BadRequest

I am getting the a 400 request failed with error 400 BadRequest. However, when I select browse I can see the data.

The full erro is as follows:

{
    "errorCode": "2200",
    "message": "ErrorCode=HttpRequestFailedWithClientError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Http request failed with client error, status code 400 BadRequest, please check your activity settings. If you configured a baseUrl that includes path, please make sure it ends with '/'.\nRequest URL: https://pm2.preqinsolutions.com/identityCore/connect/token.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.WebException,Message=The remote server returned an error: (400) Bad Request.,Source=System,'",
    "failureType": "UserError",
    "target": "Copy data1",
    "details": []
}

I am trying to make a HTTP Request to an API using the following: enter image description here

enter image description here

When I browse the SINK you can notice that data is visible from the source, so I don't understand why I'm getting the error:

enter image description here

enter image description here

The link service is as follows:

enter image description here

Any thoughts on how to fix this error?

Upvotes: 0

Views: 5343

Answers (1)

Vamsi Bitra
Vamsi Bitra

Reputation: 2764

I tried to reproduce the same in my environment via Postman and got below results:

For testing I am using sample URL.

enter image description here

In the Same way I reproduce via ADF using Copy activity :

Linked service:

enter image description here

Please follow below approach:

Request method : GET Add additional header : Authorization : Bearer < Token >

enter image description here

Output:

enter image description here

Upvotes: 0

Related Questions