'Issue in calling RestAPI in Azure Data Factory

In existing pipeline the REST API key values (client ID and client secret) are expired. So, I have generated new keys values. I am able to generate token and extract API data in Postman using new client id and client secret. In ADF pipeline, I am giving the new key values to generate token. But when calling API the newly generated token is not working. It is giving me the below error. Do I need to change anything else?enter image description here



Solution 1:[1]

Details Failure happened on ' Source side . ErrorCode RestSourceCallFailed , Type Microsoft.Data Transfer.Common.Shared.Hybrid DeliveryException , Message The HttpStatusCode 401 indicates failure .

From the error message it seems to be a permission issue. please make sure that the service principal has enough permissions.

ref1

More information about RestAPI Calling in Azure Data Factory use below Reference in which we have detailed information about

• REST linked service using UI

• Connector configuration details

• AAD service principal authentication

• API key authentication

• Copy data from REST connector into Azure Data Lake Storage in JSON format using OAuth.

Reference:

https://docs.microsoft.com/en-us/azure/data-factory/connector-rest?tabs=data-factory#how-to-use-this-solution-template

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BhanunagasaiVamsi-MT