Connect Django to a mssql database that requires company VPN and multi-factor authentication

I need to connect my Django project to my company’s mssql database, which requires company VPN and Multi-Factor Authentication to access. How to do this locally and on the server?

The company VPN part is easy - you’ll just need to connect your web server to said VPN, and it can access it like normal.

What do you mean by MFA? Django needs to connect directly to MSSQL, which I don’t believe supports MFA for authentication. You’ll need to create some credentials (which you can lock down fairly tightly) and give those to Django. The connection can still go over the VPN if you give Django the IP address of the MSSQL server.