Azure / Azure/azure-functions-powershell-library

Bug bash: Defining an HttpTrigger only with Authorization fails to execute

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Define an Http trigger function with a Authorization set to 'anonymous'.

```powershell
function AnotherFunction
{
[Function()]
param (
[HttpTrigger(Authorization = 'anonymous')]
$Request
)

[HttpResponseContext]@{
StatusCode = [HttpStatusCode]::OK
Body = "Hello form AnotherFunction!"
} | Push-OutputBinding -Name Response
}
```

The Core Tools does show that the endpoint is available:
![image](https://user-images.githubusercontent.com/12720858/186277776-8fc62bee-f8a3-413d-a6b0-23f1f671ba9e.png)

However, after calling into the endpoint, the following exception is thrown:

![image](https://user-images.githubusercontent.com/12720858/186279305-91a3d9e2-6e2d-419b-849d-0057b657c297.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the PowerShell function from the issue with Core Tools, using an HttpTrigger whose only setting is Authorization='anonymous'. Trace the request path after calling the endpoint and verify that the function executes successfully and returns an HTTP 200 response instead of the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.