Sibeesh Passion

Top Menu

  • Home
  • Search
  • About
  • Privacy Policy

Main Menu

  • Articles
    • Azure
    • .NET
    • IoT
    • JavaScript
    • Career Advice
    • Interview
    • Angular
    • Node JS
    • JQuery
    • Knockout JS
    • Jasmine Framework
    • SQL
    • MongoDB
    • MySQL
    • WordPress
  • Contributions
    • Medium
    • GitHub
    • Stack Overflow
    • Unsplash
    • ASP.NET Forum
    • C# Corner
    • Code Project
    • DZone
    • MSDN
  • Social Media
    • LinkedIn
    • Facebook
    • Instagram
    • Twitter
  • YouTube
    • Sibeesh Venu
    • Sibeesh Passion
  • Awards
  • Home
  • Search
  • About
  • Privacy Policy

logo

Sibeesh Passion

  • Articles
    • Azure
    • .NET
    • IoT
    • JavaScript
    • Career Advice
    • Interview
    • Angular
    • Node JS
    • JQuery
    • Knockout JS
    • Jasmine Framework
    • SQL
    • MongoDB
    • MySQL
    • WordPress
  • Contributions
    • Medium
    • GitHub
    • Stack Overflow
    • Unsplash
    • ASP.NET Forum
    • C# Corner
    • Code Project
    • DZone
    • MSDN
  • Social Media
    • LinkedIn
    • Facebook
    • Instagram
    • Twitter
  • YouTube
    • Sibeesh Venu
    • Sibeesh Passion
  • Awards
  • Linux Azure Function Isolated Dot Net 9 YAML Template Deployment

  • Build, Deploy, Configure CI &CD Your Static Website in 5 mins

  • Post Messages to Microsoft Teams Using Python

  • Get Azure Blob Storage Blob Metadata Using PowerShell

  • Deploy .net 6 App to Azure from Azure DevOps using Pipelines

Azure
Home›Azure›Azure DevOps Service Connection with Multiple Azure Resource Group

Azure DevOps Service Connection with Multiple Azure Resource Group

By SibeeshVenu
November 19, 2021
0
3
Share:

As you know that we can easily achieve a lot of automation by combining Azure DevOps and Azure Services. I have an Azure Pipeline that will build my application, publish my packages/artefacts generated to an Azure Web App Service and then publish the content to a CDN as well. I am sure that you might have done this several times, and we use the Azure DevOps service connection to connect to the Azure Services. While we add the Service Connection there is an option to select the Azure Resource Manager using service principal(automatic), and then we set the subscription and the resource group.

Azure Resource Manager using service principal(automatic)

This will create a new Azure AD App Registration on your Azure AD and then a new service principal will be created to connect the Azure Resource group you have mentioned. By default, this will work with only one resource group as there is no UI to select multiple resource groups. But, I wanted to use the same service connection to connect to multiple resource groups, so that I can use the same service connection in a pipeline to connect to those resources when it is necessary by using the "azureSubscription"option in the pipeline tasks. I was getting the preceding error when I try with the existing service connection.

1. Starting: Publish app to installer website 
============================================================================== 
Task : Azure App Service deploy 
Description : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby 
Version : 3.184.1 
Author : Microsoft Corporation 
Help : https://aka.ms/azureappservicetroubleshooting 
============================================================================== 
Got connection details for Azure App Service:'weu-aps01' 
##[error]Error: Resource 'weu-aps01' doesn't exist. Resource should exist before deployment. 
Finishing: Publish app to installer website 

Here in this post, we will see how we can resolve this issue.

Azure AD App Registration and Service Prinicipals

Here are the screenshots of the AD app registered and the service principal created.

AD App Registered on the Azure AD

Now, if you just go to your Azure Resource group and then click on the Access Control, under the role assignments you should be able to see the new service principal for the new AD app with contributor access.

Service Principal Created for the AD App Registration

Azur DevOps Service Connection with Multiple Resource Group

As you might have guessed already, to connect multiple resource groups to the same azure DevOps service connection, all we have to do is to add a new role assignment with the new AD application registration. Get the name of the service principal created, by clicking on the manage Service Principal option in the Service Connection and then copy the value for the Display name from the next page.

Manage Service Principal

Now, go to the resource group that you wish to give access to, click on the Access Control(IAM) and then the +Add button.

Access Control (IAM)

Select the Add role assignment option and then select the role as a contributor in the role grid, press next. From the next screen, select user, group, or service principal as the option for Assign access to. Click on the + Select members, search for our AD Registered app name, the display name and then select the same from the result, click on the select button. Finally, click the Review + assign button.

Select the Service Principal

Testing Azure DevOps Service Connection with Multiple Resource Group

I had a pipeline that connects Azure Resources from different resource groups, so to test this, all I have to do is to run the pipeline, and see whether I am getting the same error I was getting earlier. If you ever get any error saying that, ##[error]Error: Virtual application doesn't exists : resources make sure that you have configured the virtual directory in your Azure Web App, here resources is my virtual application. I know that it is specific to my case, still thought to share this in this post.

Azure Web App Virtual Application

Conclusion

In this post, we learned the preceding things.

  • What is Azure DevOps service connection
  • How to configure an Azure DevOps service connection with multiple azure resource groups

About the Author

I am yet another developer who is passionate about writing and video creation. I have written close to 500 blogs on my blog. And I upload videos on my YouTube channels Njan Oru Malayali and Sibeesh Passion. Please feel free to follow me.

  • GitHub
  • medium
  • Twitter

Your turn. What do you think?

Thanks a lot for reading. Did I miss anything that you may think is needed in this article? Could you find this post useful? Kindly do not forget to share your feedback.

Kindest Regards

Sibeesh Venu

TagsAzureAzure DevOpsAzure DevOps Service ConnectionService Connection with Multiple Azure Resource Group
Previous Article

Change MFA Phone/Mobile Number Using PowerShell

Next Article

Integrate Azure App Insights in 1 Minute ...

0
Shares
  • 0
  • +
  • 0
  • 0
  • 0

SibeeshVenu

I am Sibeesh Venu, an engineer by profession and writer by passion. Microsoft MVP, Author, Speaker, Content Creator, Youtuber, Programmer.

Related articles More from author

  • Azure

    Post Messages to Microsoft Teams Using Python

    October 1, 2022
    By SibeeshVenu
  • AzurePowerShell

    Get Azure Blob Storage Blob Metadata Using PowerShell

    May 20, 2022
    By SibeeshVenu
  • Azure

    Build, Deploy, Configure CI &CD Your Static Website in 5 mins

    March 30, 2025
    By SibeeshVenu
  • Azure

    Validating Azure ARM Template Never Been Easier

    November 5, 2020
    By SibeeshVenu
  • Azure

    TimerTrigger Azure Function to Upload to Azure Blob Daily

    July 17, 2019
    By SibeeshVenu
  • Microsoft Azure Logo
    Azure

    What Azure Is?

    July 8, 2015
    By SibeeshVenu
0

My book

Asp Net Core and Azure with Raspberry Pi Sibeesh Venu

YouTube

MICROSOFT MVP (2016-2022)

profile for Sibeesh Venu - Microsoft MVP

Recent Posts

  • Linux Azure Function Isolated Dot Net 9 YAML Template Deployment
  • Build, Deploy, Configure CI &CD Your Static Website in 5 mins
  • Easily move data from one COSMOS DB to another
  • .NET 8 New and Efficient Way to Check IP is in Given IP Range
  • Async Client IP safelist for Dot NET
  • Post Messages to Microsoft Teams Using Python
  • Get Azure Blob Storage Blob Metadata Using PowerShell
  • Deploy .net 6 App to Azure from Azure DevOps using Pipelines
  • Integrate Azure App Insights in 1 Minute to .Net6 Application
  • Azure DevOps Service Connection with Multiple Azure Resource Group

Tags

Achievements (35) Angular (14) Angular 5 (7) Angular JS (15) article (10) Article Of The Day (13) Asp.Net (14) Azure (65) Azure DevOps (10) Azure Function (10) Azure IoT (7) C# (17) c-sharp corner (13) Career Advice (11) chart (11) CSharp (7) CSS (7) CSS3 (6) HighChart (10) How To (9) HTML5 (10) HTML5 Chart (11) Interview (6) IoT (11) Javascript (10) JQuery (82) jquery functions (9) JQWidgets (15) JQX Grid (17) Json (7) Microsoft (8) MVC (20) MVP (9) MXChip (7) News (18) Office 365 (7) Products (10) SQL (20) SQL Server (15) Visual Studio (10) Visual Studio 2017 (7) VS2017 (7) Web API (12) Windows 10 (7) Wordpress (9)
  • .NET
  • Achievements
  • ADO.NET
  • Android
  • Angular
  • Arduino
  • Article Of The Day
  • ASP.NET
  • Asp.Net Core
  • Automobile
  • Awards
  • Azure
  • Azure CDN
  • azure devops
  • Blockchain
  • Blog
  • Browser
  • C-Sharp Corner
  • C#
  • Career Advice
  • Code Snippets
  • CodeProject
  • Cognitive Services
  • Cosmos DB
  • CSS
  • CSS3
  • Data Factory
  • Database
  • Docker
  • Drawings
  • Drill Down Chart
  • English
  • Excel Programming
  • Exporting
  • Facebook
  • Fun
  • Gadgets
  • GitHub
  • GoPro
  • High Map
  • HighChart
  • How to
  • HTML
  • HTML5
  • Ignite UI
  • IIS
  • Interview
  • IoT
  • JavaScript
  • JQuery
  • jQuery UI
  • JQWidgets
  • JQX Grid
  • Json
  • Knockout JS
  • Linux
  • Machine Learning
  • Malayalam
  • Malayalam Poems
  • MDX Query
  • Microsoft
  • Microsoft ADOMD
  • Microsoft MVP
  • Microsoft Office
  • Microsoft Technologies
  • Microsoft Windows
  • Microsoft Windows Server
  • Mobile
  • MongoDB
  • Monthly Winners
  • MVC
  • MVC Grid
  • MySQL
  • News
  • Node JS
  • npm
  • Number Conversions
  • October 2015
  • Office 365
  • Office Development
  • One Plus
  • Outlook
  • Page
  • PHP
  • Poems
  • PowerShell
  • Products
  • Q&A
  • Raspberry PI
  • React
  • SEO
  • SharePoint
  • Skype
  • Social Media
  • Software
  • Spire.Doc
  • Spire.PDF
  • Spire.XLS
  • SQL
  • SQL Server
  • SSAS
  • SSMS
  • Storage In HTML5
  • Stories
  • Third Party Software Apps
  • Tips
  • Tools
  • Translator Text
  • Uncategorized
  • Unit Testing
  • UWP
  • VB.Net
  • Videos
  • Virtual Machine
  • Visual Studio
  • Visual Studio 2017
  • Wamp Server
  • Web API
  • Web Platform Installer
  • Webinars
  • WebMatrix
  • Windows 10
  • Windows 7
  • Windows 8.1
  • Wordpress
  • Writing

ABOUT ME

I am Sibeesh Venu, an engineer by profession and writer by passion. Microsoft MVP, Author, Speaker, Content Creator, Youtuber, Programmer. If you would like to know more about me, you can read my story here.

Contact Me

  • info@sibeeshpassion.com

Pages

  • About
  • Search
  • Privacy Policy
  • About
  • Search
  • Privacy Policy
© Copyright Sibeesh Passion 2014-2025. All Rights Reserved.
Go to mobile version