title: Azure functions deploy from github actions results in "Error: failed to fetch Kudu App Settings.Bad Request (CODE: 400)"
body: <p>I'm getting an error when trying to deploy an Azure Function app from a GitHub Action.</p>
  <p>The error is</p>
  <pre><code>##[Initialize]
  ##[ValidateParameter]
  ##[ValidateAzureResource]
  Using SCM credential for authentication, GitHub Action will not perform resource validation.
  </code></pre>
  <blockquote>
  <p>Error: Execution Exception (state: ValidateAzureResource) (step: Invocation)<br />
  Error: When request Azure resource at ValidateAzureResource, Get Function App Settings : Failed to acquire app settings (SCM)<br />
  Error: Failed to fetch Kudu App Settings.<br />
  Bad Request (CODE: 400)<br />
  Error: failed to fetch Kudu App Settings.<br />
  Bad Request (CODE: 400)</p>
  <p>at Kudu. (D:\a_actions\Azure\functions-action\v1\node_modules\azure-actions-appservice-rest\Kudu\azure-app-kudu-service.js:62:23)<br />
  at Generator.next ()<br />
  at fulfilled (D:\a_actions\Azure\functions-action\v1\node_modules\azure-actions-appservice-rest\Kudu\azure-app-kudu-service.js:5:58)<br />
  at processTicksAndRejections (internal/process/task_queues.js:93:5)<br />
  Error: Deployment Failed!</p>
  </blockquote>
  <p>This has been working in exactly the same way for months - I have made 100s of deployments using it, but over the last couple of days its started failing (across multiple repos).</p>
  <p>It's very similar to <a href="https://stackoverflow.com/questions/64502419/azure-functions-deploy-from-github-actions-results-in-error-connect-econnrefuse/64863282#64863282">this question</a>, but when I added my 'variant' of that problem I got trampled on and told to add as a new question - so here we are.</p>
  <p>The difference in my case is that I'm not using a publish profile (at least not explicitly), instead I am using a <a href="https://github.com/marketplace/actions/azure-functions-action#using-azure-service-principle-for-rbac-as-deployment-credential." rel="nofollow noreferrer">service principal credential</a>.  It wouldn't surprise me int he least if this isn't using a publish profile under the covers (which is why I think my question is a variant of the one above).</p>
  <p>Its very important that I don't have any manual steps in my deployment process - so I really need to find a fully automated workaround for this. I'm off to trawl through the code of the GitHub action, but in the meantime, does anyone happen  to know how to fix this straight off?</p>