.NET Core Swagger security trimming of end points in ASP.NET Core application TLTR; If you need to hide endpoints in Swagger UI based on authorization token, here is the repository [https://github.com/jenyayel/SwaggerSecurityTrimming] with demo for .NET Core app. The relevant parts are passing HTTP header [https://github.com/jenyayel/SwaggerSecurityTrimming/blob/master/src/