1

I am trying to setup a build pipeline for an Azure function app coded in Python. However, I get the exception:

Failed to create an app in Azure Active Directory. Error: Insufficient privileges to complete the operation. Ensure that the user has permissions to create an Azure Active Directory Application.

I do not understand this exception, primarily because:

  1. I do not understand why it needs permissions to create an Azure Active Directory Application
  2. I believe I have rights to create an Azure Active Directory Application. E.g. I have enabled “User can register applications” in the App registrations section under User settings in AAD.

He is what I do:

In Azure, I have first created a resource group with a function app. The function is setup to run with Python version 3.8 as the runtimestack and consumption (serverless) as plan type with Linux as operating system. In Azure DevOps, with my repository selected, I:

  1. Click “Set up build”
  2. Select “Python Function App to Linux on Azure”
  3. Select the Azure Subscription
  4. Login through the popup login window that is opened
  5. Select the function app I already created and click “Validate and configure”

After step 5 I get the exception "Failed to create an app in Azure Active Directory...".

1 Answers1

1

If you need to connect to external and remote services to execute tasks in a job, you need to create related service connection. For example, you may need to connect to your Microsoft Azure subscription, so you need to create Azure Resource Manager service connection. After successfully validating it, you could use it in Azure pipelines.

If you cannot create or validate this service connection, your account do not have sufficient permission to create it. You could use the portal to create an Azure AD application and service principal that can access resources and check Azure subscription permissions.

BTW, this thread provides more information.

Edward Han-MSFT
  • 2,879
  • 1
  • 4
  • 9