Greetings!
The solution involves ensuring that the VM is AAD joined. This can be either directly AAD joined or Hybrid AAD joined, depending on your organization's infrastructure. Once the VM is AAD joined, it should be able to use Managed Identity for authentication with Azure SQL Database. Additionally, verify that the application supports Managed Identity authentication and that the VM has access to necessary URLs for Entra MFA authentication
Reference Links What is a Microsoft Entra hybrid joined device? - Microsoft Entra ID | Microsoft Learn
Regards
Geetha