Nomenator
Nomenator

Reputation: 1127

How to build from VS Team Services to Azure web app once and for all?

Preword and why this is not a duplicate:

Aight, so after failing miserably at how to deploy?, troubleshoot azure resource manager service endpoints, Continuous Delivery for Cloud Services in Azure, Deploy ASP.NET apps to Azure cloud services, Deploying an Azure Web Site using the new build system in Visual Studio Online and every link in “Similar questions”, I want to ask this question:

How to set up continuous deployment (integration, builds, whatever) from Visual studio Team Services (VSTS/TFS) to an azure web app?

What is it I’m missing?

The issues: enter image description here

I tried to create a build definition, and immediately ran into “insufficient priveleges. I am full admin on the TFS account, and owner on the Azure account. I thought maybe I could hack around with get-AzurePublishSettingsFile, some tokens and stuff, and this is what I get:

enter image description here

Right, I recognize the old portal, though I hadn’t seen it in a while, but I am owner on the azure subscription. What on earth is happening? Fine, it wants a service administrator or co-administrator, I make one:

enter image description here

There are no such things, and I can’t create a role. No service admin, no co-admin, nothing. I’m owner and I can’t create roles? That’s super-weird.

The eventual problem, I learned is in active directory, if I can allow users to register applications…

enter image description here

Okay, maybe create user in AD, and see if this helps?

enter image description here

Nearly every description of continuous integration out there describes use of classic portal.

Question: How can I get classic portal back? I used to use it a couple years ago, but lost traction ever since it started to automatically redirect to the new metro style portal.

Question: How can I enable authorization for azure ←→ TFS online?

Question: App Service Name refers to the name of the application as it is displayed in the list of “App services” in Azure portal?

Question: App service URL refers to the native url given by Azure to the application, or is it one of the custom domains I assign to the app, or is it the “publishUrl” I can find in the application’s .publishsettings file?

Question: Is SetParameters file important? Is it related to the config transformations or the publish profiles of the individual apps?

I’ll go get my AD administrator and try to get the company AD on this subscription, but I have little hope it can help.

Upvotes: 2

Views: 611

Answers (2)

Bruce Chen
Bruce Chen

Reputation: 18465

Insufficient privileges to complete the operation

As I known, this could due to a permission issue that may caused by the following causes:

  • User has only guest permission in the directory
  • User is not authorized to add applications in the directory

For more details, you could refer to this tutorial to troubleshoot this issue.

You need be a member of the Global Service administrator or Co-administrator role in old portal as follows:

Note: You could contact the Service administrator or Co-administrator of your subscription and add your account as a Co-administrator.

Upvotes: 1

juunas
juunas

Reputation: 58723

Classic Portal can be accessed if you are subscription admin or co-admin. What your role is in the new Portal doesn't matter for this. You can only be added as co-admin in the Classic Portal by the subscription admin or another co-admin.

To authorize in ARM mode (as you are trying), TFS/VSTS needs to create a Service Principal in Azure AD. This requires that your user is an admin in the Azure Active Directory.

App Service Name is exactly that. But you don't need to worry about knowing what to input, the list will be populated automatically from your subscription.

App Service URL allows you to name a variable that will contain the URL. You don't have to put anything there.

SetParameters file is used by Web Deploy. It is also not mandatory. You can find more info on it here: https://www.asp.net/web-forms/overview/deployment/web-deployment-in-the-enterprise/configuring-parameters-for-web-package-deployment

Upvotes: 0

Related Questions