Philip Fourie
Philip Fourie

Reputation: 117027

How do I create an anonymous Function App in Azure?

I want to call an Azure Function App without any Function Keys in the URL

Currently, I need to call it like this:

http://<myazureapp.com>/api/mfunc?code=3z81ag7IYWjaGdVs/Gi6BcmhROG4WJjGU3voL9UUp2iXEZZ2Vi6r7g==

If would like to call it like to call without the code query parameter:

http://<myazureapp.com>/api/mfunc

Upvotes: 6

Views: 6994

Answers (4)

noor syyed
noor syyed

Reputation: 129

If you are writing C# function app then you can set it in parameter attribute like below

public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req,
ILogger log)

Upvotes: 5

Jason D.
Jason D.

Reputation: 480

For anyone getting here, looking for "the code way", this setting is located in the function.json file:

"bindings": [
    {
      "authLevel": "anonymous",
   ...

See: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=in-process%2Cfunctionsv2&pivots=programming-language-javascript#http-auth

Upvotes: 4

Chris Gunawardena
Chris Gunawardena

Reputation: 6468

In the new UI you have to goto Integration -> Trigger -> HTTP (req)

enter image description here

enter image description here

Upvotes: 8

Joy Wang
Joy Wang

Reputation: 42143

Navigate to your function in the portal-> Integrate -> change the Authorization level to Anonymous, then you will be able to call it without code.

enter image description here

Upvotes: 5

Related Questions