Azure Data Factory Web Activity POST Method error despite success in Postman

Viewed 49

I am trying to get a token from an API using Azure Data Factory Web Activity. Below is the Web Activity Settings:

{
"name": "GetAPIToken",
"properties": {
    "activities": [
        {
            "name": "GetAuthToken",
            "type": "WebActivity",
            "dependsOn": [],
            "policy": {
                "timeout": "0.12:00:00",
                "retry": 0,
                "retryIntervalInSeconds": 30,
                "secureOutput": false,
                "secureInput": false
            },
            "userProperties": [],
            "typeProperties": {
                "url": "https://<api_url>",
                "method": "POST",
                "headers": {
                    "Content-Type": "application/json"
                },
                "body": {
                    "value": "@json('{"company_id" : "<value>"}')",
                    "type": "Expression"
                }
            }
        }
    ],
    "annotations": []
}

}

The above pipeline is giving 403 Forbidden Error. However, when I am using Postman, I am getting correct response with proper token.

Don't know what exactly I am missing here.

0 Answers
Related