NAV 2017 connection to Dynamics 365 (CRM) just stopped working

sydneynavmansydneynavman Member Posts: 11
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?

Best Answer

  • jw65jw65 Member Posts: 18
    Answer ✓
    @sydneynavman Just to confirm, I have fixed the issue with the temporary fix for two customers running NAV2017.
    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.

Answers

  • Developer101Developer101 Member Posts: 528
    Is dynamics 365 crm cloud version?
    United Kingdom
  • sydneynavmansydneynavman Member Posts: 11
    Yes, Dynamics 365 for sales online. The NAV2017 is CU26
  • Developer101Developer101 Member Posts: 528
    something might have changed as online version always evolving. some permissions might be changed for the integration user of BC and 365? I would suggest to run the setup again
    United Kingdom
  • sydneynavmansydneynavman Member Posts: 11
    After a bit of investigation, I think it might be related to this. https://docs.microsoft.com/en-us/power-platform/important-changes-coming#deprecation-of-office365-authentication-type-and-organizationserviceproxy-class-for-connecting-to-dataverse
    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
  • davidpdavidp Member Posts: 1
    sydneynavman, we are facing a similar issue on a similar version of NAV. Did you end up getting it working?
  • sydneynavmansydneynavman Member Posts: 11
    davidp wrote: »
    sydneynavman, we are facing a similar issue on a similar version of NAV. Did you end up getting it working?

    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!
  • jw65jw65 Member Posts: 18
    We have the same problem. Support tickets from clients are dropping in where the CRM integration is not working anymore.

    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; [email protected]; 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.
  • RatedZer0RatedZer0 Member Posts: 7
    Hi all, I got the same issue since yesterday with a BC on premise version.
    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
  • jw65jw65 Member Posts: 18
    @RatedZer0 what version of BC do you have? See my post above, for BC v14 I got it working, but still struggling with older NAV versions
  • RatedZer0RatedZer0 Member Posts: 7
    jw65 wrote: »
    We have the same problem. Support tickets from clients are dropping in where the CRM integration is not working anymore.

    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; [email protected]; 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.

    Which cumulative update came with the new xrm version?
  • RatedZer0RatedZer0 Member Posts: 7
    @jw65 our version is Business Central 13.1
  • jw65jw65 Member Posts: 18
    I don't know from which CU version the new v. 91 proxy came. You could check the latest CU version (currently 18)

    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?

  • RatedZer0RatedZer0 Member Posts: 7
    I just tried what you are proposing, but it gives an error that comes to say "error when loading version 91 from complement NAV XRM DLL. 'Instance couldnt convert to lXmlService'. Integration with CRM is not available."

    I'm pretty lost with this so I hope Microsoft or someone manage to find a solution soon!
  • jw65jw65 Member Posts: 18
    We will probably have to switch over to use OAuth instead of Office365 authentication?!

    https://docs.microsoft.com/en-us/powerapps/developer/data-platform/authenticate-office365-deprecation
  • sydneynavmansydneynavman Member Posts: 11
    Some good feedback here @jw65 , I still need to get it working with NAV2017 and OAuth authentication. Does anyone know the required connection string and in particular, the 'AppId' and the 'RedirectUri'
  • jw65jw65 Member Posts: 18
    @sydneynavman The article mentions that the connection string would be as example

    connectionString = "AuthType=OAuth;[email protected]; 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.
  • sydneynavmansydneynavman Member Posts: 11
    @jw65 - I had tried that string also, did not work. Do you know the process to get/create the 'AppId' and the 'RedirectUri' ?
  • jw65jw65 Member Posts: 18
    Yes and there are articles how to do that (App Registration). However I do not think you will get it to work either. I tested with a valid connectionstring (OAuth and valid AppId and RedirectUri) using powershell Microsoft.Xrm.Tooling.CrmConnector.PowerShell module.

    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.

  • Developer101Developer101 Member Posts: 528
    Best to raise with Microsoft
    United Kingdom
  • jw65jw65 Member Posts: 18
    edited 2021-06-11
    Got some info from microsoft, they are working on a fix. For NAV2018 there is a fix coming in the next Cumultive Update. Nothing yet for NAV2017 but let's hope for a quick solution.

    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.
  • sydneynavmansydneynavman Member Posts: 11
    Thanks @jw65 . Have you tried this on NA2017 and did it work ok? Step 6 mentions that some code may need to be updated in TAB5330.TXT and COD5330.TXT. I think I'll need to get my developer to do this as I don't have a licence to edit C/AL code. Would like to know it works first,
    .
  • DutchfoxDutchfox Member Posts: 1
    edited 2021-06-14
    Hi, same problem here. We follow the steps (Thanks @jw65) and changed also table 5330 and codeunit 5330 but we get now a different error.

    ij1mhz5xs0u6.png

    We have NAV2017
    Thanks.
  • jw65jw65 Member Posts: 18
    edited 2021-06-16
    I have not yet implemented the workaround solution for our customer, need some input from them first.

    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...).
  • jw65jw65 Member Posts: 18
    Answer ✓
    @sydneynavman Just to confirm, I have fixed the issue with the temporary fix for two customers running NAV2017.
    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.
  • sydneynavmansydneynavman Member Posts: 11
    Hi @jw65 , thanks so much for letting me know and bonus that the objects were still ok. What CU of NAV2017 were your customers running? We are on CU26. I'll give it a go over the weekend if I have time. Thanks again
  • jw65jw65 Member Posts: 18
    @sydneynavman they were running CU16 and CU22
  • sydneynavmansydneynavman Member Posts: 11
    @jw65 and others. I managed to get this working also on NAV2017 CU26.
Sign In or Register to comment.