Share via

Azure Function Apps: Function not found in portal

Isabel Schiffer 0 Reputation points
2024-08-14T16:06:00.12+00:00

Hi,

can anybody tell me what's the criteria for a function to show in the azure portal (to be callable from logic apps etc)?

I've got the following basic function and I just changed the Auth Level from Anonymous to Function back to Anonymous and then the function was not recognised anymore in the portal. It is stored in the file "function_app.py" and as far as I understood these are the only criteria for azure to recognise functions? anybody has any idea?


@app.route(route="http_trigger", auth_level=func.AuthLevel.ANONYMOUS)
def http_trigger(req: func.HttpRequest) -> func.HttpResponse:
    logging.info('Python HTTP trigger function processed a request.')

    name = req.params.get('name')
    if not name:
        try:
            req_body = req.get_json()
        except ValueError:
            pass
        else:
            name = req_body.get('name')

    if name:
        return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
    else:
        return func.HttpResponse(
             "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.",
             status_code=200
        )
Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

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.