Create a Service Connection from Azure DevOps to Azure Portal

Опубликовано: 29 Октябрь 2024
на канале: Code Doge
1,035
14

#azure #devops #portal

  / codedoge4  

Important Time Stamps :

00:00 - 00:10 = Video context.
00:10 - 00:29 = Where to go to create a new service connection.
00:29 - 01:17 = Creating a service connection using the recommended Azure Resource Manager Automatic method.
01:17 - 01:46 = Confirming the creation of a new service principal for use with Service Connection.
01:46 - 02:19 = Confirming that the new spn created is the valid.
02:19 - 02:51 = Reason 1 for not liking automatic method, it doesnt give you a chance to capture or save the secret made. You have to create a new client secret if you want to reuse this credential set.
02:51 - 04:14 = Reason 2 for not liking automatic method, it creates a new spn with the same name so you have to manaully change the name of service principal and also goto subscription or resource level and provide scope for spn.
04:14 - 05:04 = Using the Azure Resource Manager Manual method and creating a new service principal.
05:04 - 05:38 = Create a new client secret and save the information.
05:38 - 06:33 = Where to find the required details to create a manual service connection. It includes things like Subscription Name, Subscription ID, Tenant ID, Service Principal ID, and Service Principal Secret.
06:33 - 07:44 = Giving the newly create Service Principal access at the subscription level.
07:44 - 09:04 = Creating a new Azure Devops Service connection with the Azure Resource Manager Manual method.
09:04 - 09:40 = How to change the display name of an existing Service Principal.
09:40 to 09:58 = DOGE

Once again somehow the video length is stupid long, but I like to be thorough in sharing knowledge and context. Again I try to speak fast to save time and keep the video short.

This video covers 2 possible ways to create a service connection from Azure DevOps to Azure Portal. We explore using the ARM or Azure Resource Manager method, both Automatic and Manual.

The plus side of using automatic approach is that it auto creates spns for you and is the quickest way to get started. The downside is that it doesnt let you store the client secret generated to make the connection and if you use it per resource group, it will create multiple spns and service connections with the same display name, making it clunky inf Azure Active Directory.

Manual method requires a little bit more work upfront, but its just the creation of a SPN. You get to manually create the client secret so you can store it for safe use in the future. Maybe save it in a keyvault. Then You give the Service Principal access to subscription or whatever resource group or resources you want to scope it to. Finally, you go back to Azure DevOps and create the Azure Resource Manager Manaul and fill in the information including Azure Subscription Name, Subscription ID, Application ID, Application Secret, and Tentant ID. This is my preferred way.