We have few REST linkedServices in ADF which are making API calls to get some data.
The problem is, they only seems to work in GIT mode or preview but not on the Live Data Factory and the JSON looks different after deployment either via arm deployment or by usinbg ADF Studio.
When in Live mode, I get 403 error when running the pipeline which is not an issue in Git mode…
This is the only type of LS that json looks different after deployment and I’ve tested that in blank ADF and in some of our environments. Tried with HTTP and the json looks exactly the same in Git and in Live Mode.
I’ve even created dummy REST LS in Dev like below:
{
"name": "test_LS",
"properties": {
"annotations": [],
"type": "RestService",
"typeProperties": {
"url": "https://api.test.com",
"enableServerCertificateValidation": true,
"authenticationType": "Anonymous",
"authHeaders": {
"X-API-Key": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "LS_KEYVAULT",
"type": "LinkedServiceReference"
},
"secretName": "SOME-API-Key"
}
}
}
}
}
I’ve tested connection and it works fine and when I go to pipeline with copy data, I can get the data in preview.
But… this is how the LS looks on live mode after publishing it:
{
"name": "test_LS",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"annotations": [],
"type": "RestService",
"typeProperties": {
"url": "https://api.test.com",
"enableServerCertificateValidation": true,
"authenticationType": "Anonymous",
"encryptedCredential": "ew0KICAiVmVyc2lvbiI6ICIyMDE3LTExLTMwIiwNCiAgIlByb3RlY3Rpb25Nb2RlIjogIktleSIsDQogICJTZWNyZXRDb250ZW50VHlwZSI6ICJQbGFpbnRleHQiLA0KICAiQ3JlZGVudGlhbElkIjogIkRBVEFGQUNUT1JZQDI5NjIwQkFBLTc3RkItNEU1Ni04MDg3LTkwMkRFREY0MUMyNF81Zjg2NDkyNi1kNTY2LTRjNDItOTUwMC0zMzBiMGFlOTljZTAiDQp9"
}
}
}
As You can see, those looks different and autHeaders are missing for some strange reason and I’m pretty sure this is the reason why it does not work. The question is why tho.
If this is somehow encrypted by default, that is great but it does not work after it being encrypted…
2
Answers
I am also seeing this. It was working up until 12AM this morning. We were using Auth Headers on the REST Linked Services in ADF, and all of a sudden we started getting 401’s. Digging deeper, it looks like the Auth Headers were not even being saved properly? Either that or the encrypted credentials were used as the headers? Did Azure push some kind of change to that affected Linked Services?
This seems to be a problem introduced by ADF. Our linked services have been affected since September 2nd by exactly the same issue, despite no changes to our linked services or deployment taking place. Only REST-services are affected, while HTTP services (which utilize auth headers in the same manner) being unaffected. It seems like we’ll just have to wait for Microsoft to fix this.
UPDATE: Microsoft has stated that this is due to a bug, and have offered a (useless) workaround: https://learn.microsoft.com/en-us/answers/questions/2036344/auzure-synapse-rest-linked-service-doesnt-save-aut