Azure / Azure/azure-functions-openapi-extension

Easy Auth enabled on Azure portal for function app not allowed to exposed Swagger endpoints

Open
#644 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
388
Forks
202
PR merge metrics
No merged PRs in 30d

Description

**Describe the issue**
We are using azure-functions-openapi-extension version 1.5.1 for our existing azure function app built with netcoreapp3.1, its working locally fine but when deployed to azure portal and try to access ttps://[somefunctionapp].azurewebsites.net/api/swagger/ui?
returning 401 or "You do not have permission to view this directory or page." However azure function define AllowAnonymous Access in code but using the Latest version of Easy Auth at Azure portal. Please suggest any workaround or fix?

**To Reproduce**
Steps to reproduce the behavior:
1. Deploy Azure function to azure portal with Easy Auth enabled
2. expose url https://[somefunctionapp].azurewebsites.net/api/swagger/ui
3. See error

**Expected behavior**
It should render Swagger UI page as working on locally(localhost)

**Environment (please complete the following information, if applicable):**
- OS: Windows
- Browser edge, chrome, firefox, safari

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start by deploying the described netcoreapp3.1 Azure Function with Easy Auth enabled and request /api/swagger/ui, comparing it with the local behavior. Check whether Easy Auth or the extension's anonymous endpoint handling causes the 401, and consider the issue complete when the Swagger UI access behavior and any supported workaround are documented or fixed.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, openapi
Domain
api, authentication, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.