Swagger (Open API) UI is an API documentation and test tool, allowing both consumers and developers to see what an API is doing, and the expected inputs and outputs for each endpoint. This article shows how to implement OAuth2 with Microsoft Identity authentication within the Swagger UI for ASP.NET Web APIs.