Hello everybody.
We'are experiencing problems in connecting Business Central OnPremise installation to a Common Data service environment. Some information first, BC is an 160 version hosted on a Windows 10 Azure VM with SSL certificate binding for BC installed and done.
We followed the instructions as described in this article https://docs.microsoft.com/en-us/dynamics365/business-central/admin-how-to-set-up-a-dynamics-crm-connection, we've registered an app, we provided the necessary api permissions and made a secret key. Browsing back to BC, to Common Data Service Connection Setup, using Office365 authentication we provided the redirect url (which should be SERVER:443/.../OAuthLanding.htm to both here and to Azure app), Client id and secret key. When we tried to enable the connection, we've been asked to sign in with the an active directory admin user, and then give our consent to the necessary permissions the app requested. After done all these and clicked accept, a new pop up window opens up for seconds redirecting to https://SERVER:443/Instancename/OAuthLanding.htm?code=huge number of letters following here but after some seconds this window closes down and nothing else happens.
Back to the setup we getthe generic error Failed to Acquire and Access Token.
Any idea what else to check? We've tried disabling the server firewalls, we've tried to replace the Microsoft.Identity.Client.dll to an older version as described in release note 369662 at https://support.microsoft.com/en-us/help/4576664/update-16-5-for-microsoft-dynamics-365-business-central-2020-release-w but nothing seems to work so far. One thing that could help is that when trying to browse to https://SERVER:443/Instancename/OAuthLanding.htm directly from a browser it leads to an empty page. Any ideas?