1

Apologies for the long question, but I think some context is important here.

I am trying to set up a release definition within TFS, which should be supporting Azure deployment by using the "Azure Web App Deployment" step (see picture).

enter image description here

For this to work, I need to set up a Service Endpoint. However, I'm having issues at the point of retrieving the Management Certificate requested here:

enter image description here

There seem to be multiple places in the new portal (https://portal.azure.com) to download a *.publishsettings file, for example here:

enter image description here

The issue For some reason, all these downloads return a *.publishsettings file with the following format:

<publishData>
    <publishProfile profileName="XXX" 
                    publishMethod="XXX" 
                    publishUrl="XXX" 
                    msdeploySite="XXX" 
                    userName="XXX" 
                    userPWD="XXX" 
                    destinationAppUrl="XXX" 
                    SQLServerDBConnectionString="" 
                    mySQLDBConnectionString="" 
                    hostingProviderForumLink="" 
                    controlPanelLink="http://windows.azure.com" 
                    webSystem="WebSites">
        <databases />
    </publishProfile>
    <publishProfile profileName="XXX" 
                    publishMethod="XXX" 
                    publishUrl="XXX" 
                    ftpPassiveMode="XXX" 
                    userName="XXX" 
                    userPWD="XXX" 
                    destinationAppUrl="XXX" 
                    SQLServerDBConnectionString="" 
                    mySQLDBConnectionString="" 
                    hostingProviderForumLink="" 
                    controlPanelLink="http://windows.azure.com" 
                    webSystem="WebSites">
        <databases />
    </publishProfile>
</publishData>

The format that I require is different. I need a file with this format:

<?xml version="1.0" encoding="utf-8"?>
<PublishData>
  <PublishProfile
    SchemaVersion="2.0"
    PublishMethod="AzureServiceManagementAPI">
    <Subscription
      ServiceManagementUrl="XXX"
      Id="XXX"
      Name="XXX"
      ManagementCertificate="XXX" />
  </PublishProfile>
</PublishData>

From this file, I can retrieve the ManagementCertificate value. I can already retrieve it from the old portal using https://manage.windowsazure.com/PublishSettings/index?Client=&SchemaVersion=&DisplayTenantSelector=true, but there does not seem to be a place for this in the new portal. Is it not available, or did I simply overlook it?

Thanks in advance!

Tybs
  • 512
  • 4
  • 23
  • 1
    Publish settings based deployment is for the resources created using old portal (https://manage.windowsazure.com) that uses `Azure Service Management API`. New model of deployment makes use of `Azure Resource Manager API` which works off of authentication token received from Azure AD. Simply put, you can't use the publish settings based deployment in your case. – Gaurav Mantri Jan 19 '17 at 12:27
  • That's a shame, I was hoping it could be done this way. Thanks for the input! – Tybs Jan 19 '17 at 14:07

2 Answers2

0

Hi Tybs is there a reason you are not creating a Service Principal with a management certificate that you can then use? In your screenshot there is a link on how to use Service Principal which as Guarav pointed out is the way to connect for ARM.

https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authenticate-service-principal

Ian
  • 249
  • 1
  • 8
  • Hi Ian, Apologies for the late response, I have multiple projects at the same time to work on. We tried already to let the customer create a certificate that way, but they only manage to create an account-specific certificate, not one for a single application. Therefore, I was hoping for a more "simple" approach. Thanks for the information though :) – Tybs Feb 02 '17 at 09:19
  • No worries, I have discovered in my playing that creating an account via the new portal does not create an SPN where the old portal does. Its been a couple of months so that might of changed already! Just for completeness you can also use the Azure CLI https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authenticate-service-principal-cli – Ian Feb 02 '17 at 11:30
0

The link is already provided in the endpoint dialog, clicking it, you will get the publish settings you want: enter image description here

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
  • Hi Eddie, thank you for the time you invested in the answer. However, I mentioned in the question that this approach does not work: it returns the wrong version of a publish settings file. It occurs to me though that your Azure Connection screen looks different from mine. We have TFS version 14.95.25122.0 (Tfs2015.Update2). What version are you using? – Tybs Feb 02 '17 at 09:37