Share via

CI/CD : GitHub => Azure Function App fails to deploy

Ivan.L 5 Reputation points
2025-03-27T21:22:56.71+00:00

Failed to load Function app (function1), the client '00000a7-1be7-41a4-840c-8815cc79c000' with object id '00000a7-1be7-41a4-840c-8815cc79c000' does not have authorization to perform action 'Microsoft.Web/sites/read' over scope '/subscriptions/***/resourceGroups/function1/providers/Microsoft.Web/sites/resourceGroup1' or the scope is invalid. If access was recently granted, please refresh your credentials.

User (managed identity) 00000a7-1be7-41a4-840c-8815cc79c000 has the Contributor and Web Contributor roles assigned for the resource resourceGroup1

I went through all configurations and can not figure out why it is failing. GitHub agents can log in and do other things but can not deploy the function.

I can run the same script locally, authenticate with my credentials and deploy the function.

So the problem is with permissions assigned to user 00000a7-1be7-41a4-840c-8815cc79c000

Any help is appreciated!

Azure DevOps

1 answer

Sort by: Most helpful
  1. Harshitha Veeramalla 1,306 Reputation points Microsoft External Staff Moderator
    2025-04-02T06:54:27.4233333+00:00

    Hi @Ivan.L

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    Azure Function App fails to deploy using CI/CD: GitHub

    Solution:

    Deleting and recreating the Function App fixed the issue.

    Creating new app resets the IAM settings and may result in prompting to assign the roles again.

    And also new app creates a new Identity binding which might have helped to resolve the issue.

    You can check the role assignments using the Azure CLI

     az role assignment list --assignee ManagedIdentyClientID --all
    

    Please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    Was this answer helpful?

    0 comments No comments

Your answer

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