Hi all, not sure if anything has changed in the last day or two but our connection from NAV2017 to Dynamics 365 has stopped working. It's been working fine for a few years and just stopped working yesterday. The error we get when we try the 'test connection' is "Unable to login to Dynamics CRM". I have checked the login credentials and these are ok to login to CRM directly. Has anyone else had problems recently?
0
Answers
Looks like I may need to change from the authentication type of "Office365" to "OAuth" authentication. I am not sure how to do this though
No, not working as yet, I have been working on other things. I need to figure out the required connection string and in particular, the 'AppId' and the 'RedirectUri'. Any help would be appreciated!
For a BC14 version I was able to get it to work again by updating XRM SDK files from a newer Cumulative Update.. folder \Microsoft Dynamics NAV\140\Service\DataSources\XrmV91 and adding this option to the DataSources.json
Then in Dynamics 365 Connection Setup windows I changed the connection string to use the new prooxy version from "9" to "91".
Url=https://SomeCompany.crm4.dynamics.com; UserName=integration_user@SomeCompany.com; Password={PASSWORD}; ProxyVersion=91; AuthType=Office365;
But now also a client using NAV2017 is having the problem, and for this the above fix is not the same. Not sure yet how to fix this. I will update if I find a fix. Hopefully you will too, we're in the same boat.
Did someone make it work anyhow? Microsoft wasn't able to help me with an specific issue, they just sent me the same link sydneynavman posted before, but referencing to the regional discovery service.
https://docs.microsoft.com/en-us/power-platform/important-changes-coming#regional-discovery-service-is-deprecated
Which cumulative update came with the new xrm version?
Download-Artifacts -includePlatform -artifactUrl (Get-BCArtifactUrl -type OnPrem -version 13)
I downloaded that BC13 version just now, but it does not have the same XrmV91 binaries as BC14 platform has.
But maybe you can use try using XrmV91 from the BC14 platform in BC13 as well?
I'm pretty lost with this so I hope Microsoft or someone manage to find a solution soon!
https://docs.microsoft.com/en-us/powerapps/developer/data-platform/authenticate-office365-deprecation
connectionString = "AuthType=OAuth;Username=jsmith@contoso.onmicrosoft.com; Password={PASSWORD};Url=https://contosotest.crm.dynamics.com;AppId=51f81489-12ee-4a9e-aaae-a2591f45987d; RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;LoginPrompt=Auto"
It also says: "The AppId and RedirectUri provided above are examples of working application registration values. These values work everywhere our online services are deployed. However, they are provided here as examples and you are encouraged to create your own application registration in Azure Active Directory (AAD) for applications running in your tenant"
You could maybe try with that, however I could not get the connection to work with that connection string. Probably have to create a new application registration in the clients AAD tenant. However I don't have access to this for our client, so I'm waiting for somebody else with access to do that part.
The connection works from there using:
Get-CrmConnection -ConnectionString "..."
But with the same connectionString settings, from NAV2017 (latest CU 54) it just does not work. We might have to tell customers the bad news, but I'm hoping to get some info from microsoft. Or maybe somebody else has got it to work.
Duilio wrote yesterday something about this issue: https://community.dynamics.com/business/f/dynamics-365-business-central-forum/427075/solution-scenarios-related-to-d365-integration-that-are-using-o365-legacy-integration-and-crm-sdk-that-validate-url-against-rds
So there is a short-term solution for NAV2017 described.
.
We have NAV2017
Thanks.
I did however try the steps on a docker nav2017 container and did get the connection to work there! The funny thing I got it to work by doing only the steps up until 6, so I didn't have to modify any code (TAB5330, COD5330). I actually couldn't do the code changing steps like it was described, but this could be because of some docker container peculiarities, I got errors when trying to save/compile the object (Could not load type...).
This should work until 04/2022 or until MS implements a longer term solution in a new CU.
For now I haven't needed to change any objects. Only new .dll's and change in config files was needed in our case. As Authentication Type we kept on using Office365, as before.