Azure Function App Read-only on functions

Joey 0 Reputation points
2025-01-09T19:31:20.1566667+00:00

How can I create a custom role in Azure that allows users to view Function App code in read-only mode? Currently, users with the built-in Reader role can see the Function App but get an error requiring write permissions when trying to view the actual function code. Looking for a solution that maintains read-only access while enabling code viewing.

I tried a bunch of things with custom roles but can't seem to get it working.

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

2 answers

Sort by: Most helpful
  1. Link McKinney 495 0 Reputation points
    2025-01-13T15:19:10.41+00:00

    Hey Joey,

    Is the goal to create a custom role to allow the others access to review the code? If so, I would think you should do that in the code repo rather than the function app. However, if you are set on trying to accomplish this, I would try using the App Service Editor and putting a read-only from that perspective rather than the Code + Test area.

    By the way, if your code is compiled code (C#, Java) you will not be able to see the code from the portal anyways. ( App Service Editor, or the Code + Test area. )

    I hope this helps you,

    Link


  2. Joey 0 Reputation points
    2025-01-14T08:20:54.6866667+00:00

    Hi, see my screenshots I am not sure what I am doing differently. User's image

    When I check the permissions of the user:

    User's image

    I keep getting the error: User is not authorized for this API.

    I tried to create a bunch of roles with different roles but doesn't work. When I assign a write permission then it works.

    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.