Adding a JWT Authorize Button to Swagger UI A Softinbit Technology developer guide details how to add a JWT Authorize button to Swagger UI and Scalar in ASP.NET Core by declaring a bearer security scheme in the OpenAPI document and applying it only to operations marked with [Authorize]. The guide covers Swashbuckle 6 through 9 (pinned at 9.0.6), Swashbuckle 10 on Microsoft.OpenApi 2.x, and the built-in Microsoft.AspNetCore.OpenApi package in .NET 9 and 10, warning that Microsoft.AspNetCore.OpenApi 8.x and 9.x depend on Microsoft.OpenApi 1.x while 10.x depends on 2.x, so the packages must agree or the build or first document request fails. It also recommends keeping documentation endpoints limited to the Development environment. Add a JWT Authorize button to Swagger UI or Scalar in ASP.NET Core: bearer scheme, locks only on Authorize endpoints, Swashbuckle 10 and .NET 10 code. Note: this article was drafted with AI assistance and reviewed by Softinbit Technology before publishing. It is part of the series The .NET Implementation Playbook. Your API issues JSON Web Tokens JWT , and every endpoint with Authorize returns 401 when you try it from Swagger UI. The UI is not broken. It simply does not know that your API expects an Authorization: Bearer