title: How to connect the Azure DevOps build pipeline to the private endpoint
body: <p>I am trying to perform a mocha test on the node.js app which is hosted in Azure App Service through Azure DevOps build pipeline. And below is the release pipeline code I am using</p>
  <pre><code>    # Node.js
  # Build a general Node.js project with npm.
  # Add steps that analyze code, save build artifacts, deploy, and more:
  # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
  
  trigger:
  - Test
  
  pool:
    vmImage: 'vs2017-win2016'
  
  steps:
  - task: NodeTool@0
    inputs:
      versionSpec: '10.14.1'
    displayName: 'Install Node.js'
  
  - script: |
      npm install
  - task: PowerShell@2
    inputs:
      targetType: 'inline'
      script: 'npm run local
  
  - task: PublishTestResults@2
    condition: succeededOrFailed()
    inputs:
      testRunner: JUnit
      testResultsFiles: 'test-results.xml'
  
  - task: ArchiveFiles@2
    displayName: 'Archive $(System.DefaultWorkingDirectory)'
    inputs:
      rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
      includeRootFolder: false
      archiveFile: '$(Build.ArtifactStagingDirectory)/node.zip'
  
  - task: PublishBuildArtifacts@1
    displayName: 'Publish Artifact: drop'
  </code></pre>
  <p>When I run the build I am getting the following error</p>
  <pre><code>{&quot;name&quot;:&quot;xxxx&quot;,&quot;hostname&quot;:&quot;xxxx&quot;,&quot;pid&quot;:xxxx,&quot;level&quot;:50,&quot;msg&quot;:&quot;Error while connecting sql database xxxx-dev&quot;,&quot;time&quot;:&quot;2020-11-17T11:37:26.852Z&quot;,&quot;v&quot;:0} 
  [0] {&quot;name&quot;:&quot;xxxxx&quot;,&quot;hostname&quot;:&quot;xxxxxx&quot;,&quot;pid&quot;:xxxx,&quot;level&quot;:50,&quot;err&quot;:{&quot;message&quot;:&quot;Reason: An instance-specific error occurred while establishing a connection to SQL Server. Connection was denied since Deny Public Network Access is set to Yes (https://docs.microsoft.com/azure/azure-sql/database/connectivity-settings#deny-public-network-access). To connect to this server, use the Private Endpoint from inside your virtual network (https://docs.microsoft.com/azure/sql-database/sql-database-private-endpoint-overview#how-to-set-up-private-link-for-azure-sql-database).&quot;,&quot;name&quot;:&quot;ConnectionError&quot;,&quot;stack&quot;:&quot;ConnectionError: Reason: An instance-specific error occurred while establishing a connection to SQL Server. Connection was denied since Deny Public Network Access is set to Yes (
  [0] {&quot;name&quot;:&quot;xxxx-device-controller&quot;,&quot;hostname&quot;:&quot;xxxxx&quot;,&quot;pid&quot;:xxxx,&quot;level&quot;:50,&quot;msg&quot;:&quot;Error while attempting to complete call&quot;,&quot;time&quot;:&quot;2020-11-17T11:37:26.852Z&quot;,&quot;v&quot;:0} 
  </code></pre>
  <p>Is there a way to run the test directly in App service? or how to establish the connection</p>