CI/CD Pipeline issue, Error: input required connectedserviceName when deploying

Hossei Asifi 0 Reputation points
2025-04-12T10:39:32.0066667+00:00

I am encountering an error while setting up my Azure DevOps pipeline for deploying a Node.js application to Azure App Service. The error message states: "Input required: connectedServiceName."

Azure DevOps
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Chiugo Okpala 1,120 Reputation points MVP
    2025-04-12T18:52:06.8066667+00:00

    Hi @Hossei Asifi

    Welcome to the Microsoft Q&A community.

    The error "Input required: connectedServiceName" typically occurs when the Azure DevOps pipeline task is missing the required service connection to authenticate with Azure. Here's how you can resolve this issue:

    Steps to Fix the Error

    1.Verify Service Connection:

    • Go to your Azure DevOps project.
    • Navigate to Project Settings > Service Connections.
    • Ensure that a valid service connection (e.g., Azure Resource Manager) is created and configured with the necessary permissions.

    2.Update Your Pipeline YAML:

    In your pipeline YAML file, ensure that the azureSubscription or connectedServiceName input is correctly specified. For example:

    - task: AzureWebApp@1
      inputs:
        azureSubscription: 'YourServiceConnectionName'
        appName: 'YourAppName'
        package: '$(System.DefaultWorkingDirectory)/drop/package.zip'
    
    
    
    • Replace 'YourServiceConnectionName' with the name of your service connection.

    3. Check Task Version:

    • Ensure you're using the correct version of the task. For example, if you're deploying to an Azure App Service, use AzureWebApp@1 or AzureWebApp@2 depending on your requirements.

    4.Validate Variables:

    If you're using pipeline variables for the service connection, ensure they are correctly defined and referenced. For example:

    azureSubscription: $(azureSubscription)
    
    
    

    Make sure the variable azureSubscription is defined in your pipeline.

    5.Test the Service Connection:

    In the Service Connections section, test the connection to ensure it's working properly.

    Additional Tips

    • If you're using a classic pipeline, ensure that the service connection is selected in the task configuration UI.
    • If the issue persists, try creating a new service connection and updating your pipeline to use it.

    I hope these helps. Let me know if you have any further questions or need additional assistance.

    Also if these answers your query, do click the "Upvote" and click "Accept the answer" of which might be beneficial to other community members reading this thread.

    User's image


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.