Why am I not able to create an Azure Function app within the Azure portal, but I can in Visual Code?

John van Lennep 0 Reputation points
2024-09-12T09:59:30.6733333+00:00

I used to be able to create an Azure Function App within both the Azure portal and Visual Code.
Now I am no longer able to create an Azure Function App in the Azure portal anymore. Whenever I want to create an Azure Function App within the portal I get the following error message:
{"code":"AuthorizationFailed","message":"The client 'j.vanlennep@archive-it.nl' with object id '[REDACTED]' does not have authorization to perform action 'Microsoft.App/register/action' over scope '/subscriptions/[REDACTED]' or the scope is invalid. If access was recently granted, please refresh your credentials. (Code: AuthorizationFailed)"}
I perform the following steps:

  • Create a function app (Consumption) within one of my Resource groups
  1. Runtime stack: .Net
  2. Version: 8 (LTS), in-process model
  3. Region: West Europe
  4. Operating System: Windows
  • Storage
  1. I selected a storage account I created earlier; if there isn't one, create a new; keep all other default settings
  • Networking
  1. Keep the default settings
  • Monitoring
  1. Enable Application Insight: No
  • Deployment
  1. Continuous deployment: Disable
  2. Github settings: keep default settings
  3. Basic authentication: Enable
  • Tags
  1. Keep the default settings
  • Review and create

However when I use Visual Studio Code on my Windows PC, I am able to create the Azure Function App

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,004 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pinaki Ghatak 4,295 Reputation points Microsoft Employee
    2024-09-16T18:39:02.0666667+00:00

    Hello @John van Lennep

    The error message indicates that your account does not have the required permissions to perform the action.

    To resolve this issue, you need to ensure that you have the necessary permissions to create a Function App in your subscription. You can check your permissions by going to the Access control (IAM) tab in the Azure portal and verifying that you have the Contributor role assigned to your account at the subscription or resource group level.

    If you are still facing issues, you can try refreshing your credentials or signing out and signing back in to the Azure portal.

    Alternatively, you can create the Azure Function App using Visual Studio Code on your Windows PC, as you mentioned that it is working fine there. Let me know if you have any other questions or concerns.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.