ADF REST LinkedService is missing AuthHeader in Live mode after publishing

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…

Spoke to support earlier today, ADF engineering team are aware and actively working on a resolution – but no ETA. It was suggested to me that the issue only arose when a keyvault was used in the Linked Service – so a short term workaround was possible by removing the keyvault and specifying the value directly…. but thats not been my experience

I have a REST LS, which takes the value for the auth header from a keyvault secret, and the keyvault LS is, in turn, using a global parameter supplying the keyvault location. I thought maybe this level of parameterization and keyvault usage was part of the problem. However, I sat on the call and showed the support person that the issue occurs on simpler setups – even just creating a simple rest LS, with a url explicitly supplied, and a header added which is also just a string – at that point the LS is immediately published to live, and shows up on live without the header.

So – no workarounds I’m aware of, I’m currently applying the header directly in production DF, then debugging, for one or two copy Data Tasks that use an LS with an auth header. These are failing when triggered. Not ideal.

Update: We managed to figure out a workaround!

For some reason, the authHeaders only get encrypted when a single value is provided. When two auth headers are provided, the value does not get encrypted or get published correctly.

So our work around is to just add a test value to every auth header:

Messy. But it works! Most APIs only check for the auth headers they require, so it shouldn’t affect data retrieval.

Auth headers are published correctly when two (or more) of them are specified.


Microsoft has stated that this is due to a bug, and have offered a (lousy) workaround: https://learn.microsoft.com/en-us/answers/questions/2036344/auzure-synapse-rest-linked-service-doesnt-save-aut

From your screenshot, it appears that you have added the value from Azure Key Vault (AKV).

If this is correct:

The issue is due to a bug, and the product group is working on a fix. However, there is no ETA at this time.

Workaround: You need to remove the AKV until the permanent fix is deployed.

We tried hardcoding the values instead of referring to the key vault, but this did not solve our issue. The hardcoded value would be encrypted in the same fashion and the LS would not work.

Answer from Microsoft PG:

ADF Rest Linked Service Auth headers issue had already been fixed since 6th Sept, 2024.
User can save auth header either in AKV or plain text, it can work fine.

Currently if you input plain text in auth headers, it will disappear after saving and refreshing. Because Credentials are encrypted. It’s known experience and will not block functionality.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật