·
2 min read

How to get Microsoft Dynamics NAV for tablets to connect using a self-signed certificate

OverviewThis blog post helps you connect Microsoft Dynamics NAV for tablets using a self-signed certificate. The targets for the blog post are the following apps:

  • Dynamics NAV for iPad
  • Dynamics NAV for Android
  • Dynamics NAV for modern Windows

The Internet Information Services Manager (IIS) needs a trusted certificate that holds the private key for https. iOS and Android need the https certificate to be trusted by a root certificate.

In this blog post, you will be creating one certificate that is used for both the IIS to enable https and to install on your device. Follow the steps below and replace the following string: <your site name> with the name of the site. You can either use a real name like www.abc.com, or use your pc name. It must match the first part of the URL that you have specified. Currently the PowerShell script New-SelfSignedCertificateEx supports Windows 8 and Windows Server 2012 and newer.

Steps

For the Microsoft Dynamics NAV Web server, do the following:

  1. Download and save the PowerShell script from https://gallery.technet.microsoft.com/scriptcenter/Self-signed-certificate-5920a7c6#content.
  2. Create the certificate:
    1. Open a PowerShell prompt with the option As administrator.
    2. Go to the directory where you saved the New-SelfSignedCertificateEx.ps1 file.
    3. Run the following command: Import-Module .\New-SelfSignedCertificateEx.ps1.
    4. Then run the following command: New-SelfSignedCertificateEx –Subject “CN=<your site name>” –IsCA $true –Exportable –StoreLocation LocalMachine –StoreName My.
    5. Manage the certificate:
      1. Open the mmc.exe.
      2. Go to the File menu, and then choose Add/Remove Snap-in...
      3. Select Certificates.
      4. Choose Add.
      5. Select the computer account.
      6. Choose Finish and then OK.
      7. Locate and copy the certificate you just created in the personal/certificates folder.
      8. Paste the certificate into the Trusted Root Certification Authorities/Certificates folder.
      9. Select the certificate, right-click and export the certificate.
      10. Select the No, do not export the private key option.
      11. Choose Next.
      12. Select DER encoded binary x.509 (.cer).
      13. Specify a location and filename and finish the wizard.
      14. Enable https: In IIS Manager, create a binding for https using the certificate you added.

Next

For iOS, do the following:

  1. Use the iPhone Configuration Utility tool from Apple http://support.apple.com/downloads/#iphone or mail the certificate you exported.
  2. Run the certificate file and install the certificate.
  3. You are now ready to start the Dynamics NAV app.

For Windows, do the following:

  1. If you run the client on the same box as the web server, then you are all set to go.
  2. Copy the certificate you exported to the tablet, install the certificate and place the certificate in the Trusted root certification authorities folder of the local machine.

For Android, do the following:

  1. Copy or mail the certificate that you exported.
  2. Run the certificate file and install the certificate.
  3. You are now ready to start the Dynamics NAV app.

This should help you get up and running using self-signed certificates. Be aware that Microsoft Dynamics NAV for tablets does not support Always Ask certificates.