Azure / azure-functions-openapi-extension

This extension provides an Azure Functions app with Open API capability for better discoverability to consuming parties
https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/
MIT License
370 stars 194 forks source link

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

Open aifazk opened 7 months ago

aifazk commented 7 months ago

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):

Additional context Add any other context about the problem here.