0
votes

Is it possible to create and configure an Azure application registration using an Azure DevOps pipeline?

I'm working on setting up a bot from Microsoft Bot Framework 4.4+. Ideally, I'd like to be able to create all of the Azure resources (including the application registration) with a click of a button from Azure DevOps. I'd also like to be able to tear all those resources down with another click of a button.

This question is fairly straight forward, but I can't seem to find much documentation.

2

2 Answers

1
votes

One idea could be:

  • Use an Azure CLI task (see doc here) in your pipeline.
  • Use the az ad app create CLI command (doc here) in this task

Bots are Azure AD apps, you can find your existing ones using az ad app list

0
votes

Another way to achieve this could be to add a Powershell task to your pipeline.

Here is Microsoft Documentation on adding a Powershell Task

Then make use of New-AzureRmADApplication or New-AzADApplication

New-AzureRmADApplication -DisplayName "NewApplication" -HomePage "http://www.microsoft.com" -IdentifierUris "http://NewApplication"

or

New-AzADApplication -DisplayName "NewApplication" -HomePage "http://www.microsoft.com" -IdentifierUris "http://NewApplication"