Start here. This is the direct spoken answer to practice first.
Why this question matters
Managed identity login to Azure SQL crosses token acquisition, network reachability, database user mapping, and authorization. Separating those layers prevents a permission problem from being treated as a connection problem or vice versa.
I would confirm that the App Service has the expected managed identity and that the connection string uses Microsoft Entra managed identity authentication, not SQL password authentication. Then I would verify that Azure SQL has a user mapped for that identity and that the user has the required permissions. I would also check SQL firewall, private endpoint, VNet integration, and whether the failing environment uses the same identity as the one that was granted access. The error message usually tells whether this is authentication, authorization, or network access.