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:
- I do not understand why it needs permissions to create an Azure Active Directory Application
- 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:
- Click “Set up build”
- Select “Python Function App to Linux on Azure”
- Select the Azure Subscription
- Login through the popup login window that is opened
- 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...".