Issues using Linked Service in Web Activity after ARM deployment

Dag Martin Romslo 20 Reputation points
2024-10-21T09:03:19.3766667+00:00

We follow this flow for CI/CD deployment between environments: https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-delivery-improvements#the-new-cicd-flow

Which use this NPM package for ARM export: https://www.npmjs.com/package/@microsoft/azure-data-factory-utilities

When using the preview feature for Web Activity using a linked service (https://learn.microsoft.com/en-us/azure/data-factory/how-to-manage-studio-preview-exp#linked-service-for-web-activity), we get a runtime error in environments that are based on the ARM deployment.

Typical error message:

Operation on target xyz: Linked service experience has been modified, please recreate the linked service to resolve this issue.

After digging more into this, I see the that generated ARM template is missing the property 'authenticationType' (which defaults to "Anonymous").

User's image

My theory is that the missing property is causing the issue.

If I do manual deploy via Data Factory portal via the adf_publish branch, everything works.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

Accepted answer
  1. Smaran Thoomu 24,110 Reputation points Microsoft External Staff Moderator
    2024-10-29T15:21:37.07+00:00

    Hi @Dag Martin Romslo

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others "I'll repost your solution in case you'd like to accept the answer.

    Ask: We follow this flow for CI/CD deployment between environments: https://learn.microsoft.com/en-us/azure/data-factory/continuous-integration-delivery-improvements#the-new-cicd-flow

    Which use this NPM package for ARM export: https://www.npmjs.com/package/@microsoft/azure-data-factory-utilities

    When using the preview feature for Web Activity using a linked service (https://learn.microsoft.com/en-us/azure/data-factory/how-to-manage-studio-preview-exp#linked-service-for-web-activity), we get a runtime error in environments that are based on the ARM deployment.

    Typical error message:

    Operation on target xyz: Linked service experience has been modified, please recreate the linked service to resolve this issue.

    After digging more into this, I see the that generated ARM template is missing the property 'authenticationType' (which defaults to "Anonymous").

    User's image

    My theory is that the missing property is causing the issue.

    If I do manual deploy via Data Factory portal via the adf_publish branch, everything works.

    Solution: I have created a new ADF instance and reproduced the issue. There is no difference if I'm using the npm package to export ARM template OR if I'm doing it from the ADF portal.

    The generated ARM template is missing the authenticationType, and pipeline fails after ARM import.

    If I manually add authenticationType to the ARM template before import, the pipeline works.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2024-10-21T14:27:37.1466667+00:00

    I think when in the ARM template generated from the CI/CD pipeline appears to be missing the authenticationType property in the Linked Service configuration, it is set by default to "Anonymous" when not specified.

    You can manually update the ARM template with the missing authenticationType property.

    
    "typeProperties": {
    
      "authenticationType": "Anonymous"
    
    }
    
    

    This may help ensure that the deployment remains consistent across environments.

    If you consistently face this issue after ARM deployments, you may need to modify the script or process that generates or modifies the ARM template (like the NPM package @microsoft/azure-data-factory-utilities).

    Alternatively, you could create a post-deployment script that automatically adds or fixes the authenticationType property for the Web Activity's linked service.

    Also, since you are using a preview feature (Web Activity linked services), it's possible there could be a temporary mismatch between the Azure Data Factory service and the way the ARM templates are generated. Keep an eye on the preview feature's documentation and updates, as the problem could also be addressed in future updates.

    Verify that you are using the latest version of the @microsoft/azure-data-factory-utilities package, as this might resolve the ARM template generation issues. You can do this by running:

    
    npm update @microsoft/azure-data-factory-utilities
    
    

    As a workaround, since deploying from the adf_publish branch manually works for you, you could automate the deployments from the adf_publish branch instead of relying solely on the ARM template.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.