title: How to get Azure Devops Web Applications to deploy
body: <p>I am setting up Azure Devops to deploy a .Net Core Web Application to Azure. In Visual Studio, I have created a publish profile and publishing with this profile works correctly. I use the user name and password from the portal.</p>
  
  <p>Now I am trying to get this to work in an Azure Devops pipeline. There are steps to get Nuget packages, get key vault secrets, and build. I have verified that the zip file package is getting created correctly. </p>
  
  <p>I am using an "Azure App Service Deploy" step for deployment. It points to the pubxml profile and the zip package and the password is the same one that I use for publishing from Visual Studio. When it runs, I get the following error: </p>
  
  <pre><code>Error Code: ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP
  More Information: Could not complete an operation with the specified provider ("createApp") when connecting using the Web Management Service. This can occur if the server administrator has not authorized the user for this operation. createApp http://go.microsoft.com/fwlink/?LinkId=178034  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP.
  Error count: 1.
  </code></pre>
  
  <p>Looking at the log, it is issuing the following command:</p>
  
  <pre><code> "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='D:\a\1\a\CallService.zip' -dest:auto,computerName="https://xxxxx.scm.azurewebsites.net:443/msdeploy.axd?site=xxxxx",userName="xxxx",password="xxxxx",authtype="basic",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"D:\a\1\a\CallService.SetParameters.xml"  -enableRule:DoNotDeleteRule -retryAttempts:6 -retryInterval:10000
  </code></pre>
  
  <p>The user name and password have been redacted here but they match what is in the portal for deployment credentials and what I am using fom Visual Studio.</p>
  
  <p>I would expect this to work since the Visual Studio deploy is working with the same profile and creds. I would like to know if anyone knows how to make the deployment work from Azure DevOps.</p>