0
votes

I am trying to release multiple projects in 1 solution using Azure Release pipeline

They are all connected to the same Azure Subscription, but some do deploy to the given app service while others give an unauthorized error.

Ive looked into it and i read that adding website_webdeploy_use_scm to the app service should help the Unauthorized error, but this didnt help for me.

What else could i look at? I connect through Azure Devops so i just selected the subscription from the list it automatically gathers from Azure because im logged in using the same logins as i use for Azure Portal

the full error is:

 Connected to the remote computer ("xxxx.azurewebsites.windows.net") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error: The remote server returned an error: (401) Unauthorized.
2

2 Answers

0
votes

according to the error I'd suggest you check service principal permissions. it probably lacks the permissions required to manage those webapps.

0
votes

So after refresh publishing profile in Azure Portal and trying it again it fixed itself so im not sure if that caused it or not but it worked!

another fix is to delete the slot and make it again