Creating an Azure Resource Manager Service Endpoint in new Portal

While working on yo TFS I needed a Service Principal to create an Azure Resource Manager Service Endpoint. Depending on the Azure tasks you use in your Team Foundation Server (TFS) builds and releases, you may need this information as well. In this post I will show you how to create an Azure Service Principal using the new Azure Portal.

While we move through the creation of the Service Principal, be sure to copy the Application ID, Key, Tenant ID, Subscription name, and Subscription ID.

Create Service Principal

To create a Service Principal we must first register an application in the Azure Active Directory, which we will do now.
  1. Visit the Azure Portal
  2. Click More services
  3. Filter for Azure Active Directory
  4. Click App registrations of the selected Active directory
  5. Click the Add button at the top of the blade
  6. Enter a name for your application and make sure Web app / API is selected
  7. Enter Sign-on URL based on your application name
    It does not have to be real.
  8. Click Create
  9. Once the application is created take note of the Application ID
    When we create our Service Endpoint this will be the Service Principal ID
  10. Click Keys 
  11. Enter a Key description
  12. Select a key duration
  13. Click Save at the top of the blade
  14. Once the key is saved copy the value and place it with your Client ID
    This will be your only chance to collect this value.

Find Tenant ID

With the Active Directory blade open, we can harvest the Tenant ID.

  1. Click Properties
  2. The Directory ID is your Tenant ID

Find Subscription Name & ID and Grant access

You will also need the subscription name and ID to complete the service endpoint.

  1. Click More services
  2. Filter for Subscriptions
  3. Copy the Subscription and Subscription ID values
  4. Select the subscription you are using
  5. Click Access control (IAM)
  6. Click Add
  7. Select Contributor as the roll
  8. Search and select the name of the application you just created
  9. Click Select
  10. Click OK to grant the service principal access to your subscription

When it comes time to create the Service Endpoint you have to make sure and map all the data found to the correct location. You can use the image below to help.


Comments (1) -

  • Jonas Brolin

    10/5/2017 6:13:46 AM | Reply

    Thank you! Very helpful!

Pingbacks and trackbacks (2)+

Add comment