Azure SQL Managed Instance — subnet, endpoints and ports, Entra logins, failover groups, and how it differs from SQL Database

What changes when the target is SQL Managed Instance rather than SQL Database — the dedicated, delegated subnet with its NSG, route table and /27 minimum (and how many addresses each instance and scale operation takes), the VNet-local, public (port 3342) and private endpoints and their DNS names, Proxy vs Redirect, server-level Entra logins in master, Entra-only authentication, failover groups, and the errors that come from the network rather than SQL.

markdownreferencev1TBTY-D743stage: designtrust: officialservice: sqlinterface: cliinterface: iacAzure SQL Managed InstanceSQL MI subnet delegation Microsoft.Sql/managedInstancesSQL MI subnet size /27SQL MI IP addresses per instanceSQL MI NSG route table requiredservice-aided subnet configurationnetwork intent policyVNet-local endpointSQL MI public endpoint port 3342<mi_name>.public.<dns_zone>.database.windows.netSQL MI private endpointSQL MI Proxy RedirectCREATE LOGIN FROM EXTERNAL PROVIDERCREATE USER FROM LOGINaz sql mi ad-only-auth enableSQL MI failover groupinstance failover groupTLS 1.2 outbound linked serveraz sql mi create

Created 21 Oct 2026 · Modified 23 Oct 2026 · 1 version

Azure SQL Managed Instance

Managed Instance is SQL Server as an instance (SQL Agent, cross-database queries, linked servers, CLR) inside your VNet. Choose it to lift SQL Server workloads that use instance-level features; for new apps, SQL Database (reference/sql/connections-and-auth.md) is simpler.

The subnet

RequirementDetail
DedicatedOnly managed instances; not a gateway subnet
DelegationMicrosoft.Sql/managedInstances
NSG and route tableBoth must be associated. The service adds and maintains its own rules and routes (service-aided configuration with a network intent policy); your entries can add on-premises routes or a 0.0.0.0/0 to a firewall
SizeAt least 32 addresses (/27). Azure takes 5, each VM group 8, each General Purpose instance 2 and each Business Critical instance 5 (+2 zone-redundant), and a scaling operation temporarily doubles an instance's addresses. Multi-instance formula: 5 + (gp × 4) + (bc × 10) + (bc_zr × 2) + (vmg × 8), rounded up to a power of two
GrowthThe range can't change while resources are in it: size for future instances and VM groups

Endpoints

EndpointNamePortConnection type
VNet-local (default)<mi_name>.<dns_zone>.database.windows.net1433Proxy or Redirect (the instance's setting)
Public (off unless enabled)<mi_name>.public.<dns_zone>.database.windows.net3342Always Proxy
Private endpoint (from another VNet)Same as VNet-local unless configured otherwise1433Always Proxy

Always connect by name, and allow the ports to the whole subnet range: the instance's IP can change. Ask for an encrypted connection without trusting the server certificate blindly. Outbound connections from the instance (replication, linked servers to SQL Server) require TLS 1.2: older SQL Server partners need their TLS 1.2 updates.

Entra logins and users

Managed Instance has server-level Entra logins, unlike SQL Database's contained users:

USE master;
CREATE LOGIN [app-orders-identity] FROM EXTERNAL PROVIDER;   -- managed identity, user or group
USE appdb;
CREATE USER [app-orders-identity] FROM LOGIN [app-orders-identity];   -- user name must equal the login name
ALTER ROLE db_datareader ADD MEMBER [app-orders-identity];

The instance's identity needs Directory Readers (or the equivalent Graph permissions) to resolve names. Entra-only authentication works as for SQL Database: az sql mi ad-only-auth enable -g <rg> -n <mi>; SQL Agent jobs work, but a group member can't own them, and transactional replication isn't supported with it on.

Failover groups

Instance failover groups replicate all user databases to a secondary instance in another region; the listeners and failover policies behave as for SQL Database (reference/sql/scale-and-continuity.md). Logins live in master on each instance: create the same Entra logins on the secondary before you need it.

Network symptoms

SymptomCause → fix
Timeouts from a peered VNet or on-premisesNSG on the instance subnet doesn't allow 1433 (and 11000–11999 for Redirect) from the client range
Public endpoint unreachablePublic endpoint not enabled, or the NSG lacks an inbound 3342 rule
Deployment fails preparing the subnetSubnet not delegated, not empty, missing NSG or route table, or too small
Logins fail with "principal not found" style errorsThe instance identity can't read Entra (Directory Readers missing)

The hub's reading: these rows turn the documented requirements into symptoms; Microsoft's pages don't give the exact messages.

Read this document as markdown — the same bytes an agent receives.