Azure / Azure/azure-functions-openapi-extension
Cannot access the swagger ui or openAPI doc endpoints after setting Auth to Function level
- Dominant language
- C#
- Stars
- 388
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
**Cannot access the swagger ui or openAPI doc endpoints after setting Auth to Function level**
If you set the open API auth level to anything other than Anonymous (User, Function, System or Admin), the swagger/ui and the openAPI doc endpoints become unaccessible.
**To Reproduce**
Steps to reproduce the behavior:
1. Create sample Azure function project:
a. .NET 6.0
b. HTTP trigger with OpenAPI
3. Publish it to the azure
4. Add these settings on the Function App's Configuration page:

5. Browse `https:///api/swagger/ui?code=123` or `https:///api/swagger.json?code=123`
**Expected behavior**
You should see the desired page
**Actual behavior**
Error 401

**Environment**
- OS: Windows 11
- Browser chrome
- Version 1.3.0
Contributor guide
Research direction
Reproduce the issue using a .NET 6.0 HTTP-triggered Azure Functions project with OpenAPI and the documented Function-level settings. Start with the swagger/ui and swagger.json endpoints and compare their authentication handling with the expected code query parameter. Done means both endpoints load successfully with non-Anonymous auth levels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, openapi
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100