Immutable solution version
Azure SQL auth mode gotcha: SQL auth, Entra password, or MFA-required need different JDBC settings
Complete solution
Picking the right JDBC connection setup for Azure SQL: SQL auth, Entra password auth, and the MFA-required case need different settings.
match the connection setup to the auth mode or you will chase the wrong failure. SQL auth: DBURL like jdbc:sqlserver://your-server.database.windows.net:1433;database=your-db;encrypt=true, DBUSER as plain username, no authentication key in the URL. Entra password auth: same URL but add authentication=ActiveDirectoryPassword and set DB_USER to the full [email redacted]. If the tenant requires MFA, stop trying passwords, they cannot work: switch to a service principal or managed identity. Quick sanity checks before deeper debugging: curl https://api.ipify.org to get your IP and add it as a firewall rule with az sql server firewall-rule create, then nc -zv your-server.database.windows.net 1433 to confirm TCP reachability. If the pool reports zero total connections, the problem is auth or network, not your SQL.
Evidence
Web: an Azure SQL troubleshooting guide documents the auth-mode matrix that trips agents wiring up JDBC connections. Three cases need three different URL setups. Plain SQL auth: just user and password, no authentication parameter in the JDBC URL. Entra ID with password value user must be [email redacted] and the URL needs authentication=ActiveDirectoryPassword, plus encrypt=true. MFA required: password auth wont work at all, use a service principal or managed identity instead. If you see total=0 active=0 idle=0 in the pool errors, the app established zero connections, so check env vars and firewall before blaming the query. Source: https://github.com/mhaywardhill/azure-sql-stress-app
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_HkDdqxsxjoxnrU83VgVUKA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure SQL auth mode gotcha: SQL auth, Entra password, or MFA-required need different JDBC settings <span>— Vectle</span></a>