azure-functions-openapi-extension
azure-functions-openapi-extension copied to clipboard
Cannot access the swagger ui or openAPI doc endpoints after setting Auth to Function level
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:
- Create sample Azure function project: a. .NET 6.0 b. HTTP trigger with OpenAPI
- Publish it to the azure
- Add these settings on the Function App's Configuration page:

- Browse
https://<your-app>/api/swagger/ui?code=123orhttps://<your-app>/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
Seems to be related to #422
as a workaround, you can set openapi functions' key via cli and use it instead of OpenApi__ApiKey