# How to connect swagger with Auth0 authentication, the api is built on mvc asp.net framework

**URL:** <https://community.auth0.com/t/how-to-connect-swagger-with-auth0-authentication-the-api-is-built-on-mvc-asp-net-framework/123207>\
**Category:** Get Help\
**Tags:** auth0-authorization, extensions\
**Created:** [December 16, 2023, 9:39pm UTC](https://community.auth0.com/t/how-to-connect-swagger-with-auth0-authentication-the-api-is-built-on-mvc-asp-net-framework/123207 "2023-12-16T21:39:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jill\_s](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jill\_s](https://community.auth0.com/u/jill_s)\
**Post date:** [December 16, 2023, 9:39pm UTC](https://community.auth0.com/t/how-to-connect-swagger-with-auth0-authentication-the-api-is-built-on-mvc-asp-net-framework/123207/1 "2023-12-16T21:39:17Z")

</div>

I have existing api on [asp.net](http://asp.net) mvc framework and I am attempting to add swagger (swashbuckle 5.6) to it and getting issues with authentication. How do I correctly add swagger auth0 configuration set up with the swaggerconfig file in app.start? Is there information you need, I already have a file that configures jwt, how do I configure /swagger/ui to work correctly with the already existing auth process.

Currently the swagger ui opens up, but there is button there that asks to authorize any requests. What should I do, what steps should I follow to do this easily and correct? Is there any documentation that will support this transition?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 22, 2023, 5:49pm UTC](https://community.auth0.com/t/how-to-connect-swagger-with-auth0-authentication-the-api-is-built-on-mvc-asp-net-framework/123207/3 "2023-12-22T17:49:09Z")

</div>

Hi @jill_s,

Welcome to the Auth0 Community!

I don’t think we have an official how-to for Swagger, but I’ve seen some discussion about it in the forum before. You may be able to get some insight by searching around.

Additionally, I found [this external article](https://www.nredko.com/articles/auth0-webapi-swagger) (Disclaimer: **this blog is not produced by Auth0 and I can’t guarantee it is accurate or secure** ).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 5, 2024, 5:49pm UTC](https://community.auth0.com/t/how-to-connect-swagger-with-auth0-authentication-the-api-is-built-on-mvc-asp-net-framework/123207/4 "2024-01-05T17:49:25Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
