Our Website uses Windows Authentication for both UI and SQL, we are now migrating to Azure. Our On-Prem Active Directory is already federated to Azure Active Directory. we created a new VM and hosted our site and it worked.
Now we migrated our SQL databases to SQL Managed instance on Azure and used the connection string for managed instance in our site's web config. the same setup is working when we debugged the site from visual studio.
IIS is throwing a error stating
could not discover a user realm
however we have added our VM to domain and website is working fine when run from IIS Express.
I compared configuration files to see if there any are any differences.
When I run the same site which has managed instance connection string on IIS Express, it is working as expected. But it is not working from IIS.