How to enable the Dynamics NAV 2017 Outlook add-in?

Recently I saw this Youtube video by Steven Renders about how to configure the Outlook Add-in for Microsoft Dynamics NAV 2017. In this 6-minute video Steven shows what is needed to install the Dynamics NAV 2017, but nowhere is being explained how to get the add-in to work in Outlook. So I’ve decided to dedicate a blogpost to it!

Step 1: Install Dynamics NAV 2017

I think this is rather self explanatory. Install Dynamics NAV 2017. Don’t forget to check the box for the Microsoft Dynamics NAV Web Server components.

Step 2: Install IIS

Again: rather self explanatory. Go to the Configuration screen, click “Turn on or off Windows features” and tick the box for “Internet Information Services”.

Step 3: Create a user in Microsoft Dynamics NAV

Open NAV and create a new user (with sufficient rights). Appoint the user a password and uncheck the box “User must change password at next login”.

Step 4: SSL certificate

Normaly you’d buy a SSL certificate, but for test purposes we’ll create our own self-signed certificate:

  1. Download the New-SelfSignedCertificateEx.zip file from here
  2. Extract the zip-file
  3. Start Windows PowerShell ISE (Start > Windows Powershell > Windows Powershell ISE)
  4. Probabely Powershell isn’t allowed to run scripts, so execute the following commando: Set-ExecutionPolicy -Scope LocalMachine Unrestricted
  5. Klik “Run Once”
  6. Navigate to the folder where you’ve extracted the New-SelfSignedCertificateEx.zip file
  7. Execute the following commando: Import-Module .\New-SelfSignedCertificateEx.ps1
  8. Execute the following commando: New-SelfSignedCertificateEx –Subject “CN=<your site name>” –IsCA $true –Exportable –StoreLocation LocalMachine, where <your site name> = full computer name of the machine Dynamics NAV is installed on. This can be found in the System Information
  9. Execute the command. The result will be something like this:Windows PowerShell ISE
  10. Remember the Thumbprint! We’ll need this later on!

You can also get a free SSL certificate signed, for example, by StartSSL. This is an improvement on self-signed certificates, because your end-users would stop getting warning pop-ups informing them of a suspicious certificate on your end. However, the browser bar is not going to turn green when communicating with your site over https, so this solution is not ideal.

The cheapest SSL certificate that turns the bar green will cost you a few hundred dollars, and you would need to go through a process of proving the identity of your company to the issuer of the certificate by submitting relevant documents.

Once you obtain a certificate, you must import it into the local computer store on the computer running Microsoft Dynamics NAV Server. The certificate file will have the extension .cer or .pfx.

To import an SSL certificate into the local computer store

This procedure assumes that you do not already have the Certificates snap-in installed in Microsoft Management Console. If the Certificates snap-in is already installed, skip steps 3 to 7 and go to step 8.

  1. On the computer running Microsoft Dynamics NAV Server, choose Start, and then choose Run.
  2. In the Open box, type mmc, and then choose OK.
  3. On the File menu, choose Add/Remove Snap-in.
  4. In the Add/Remove Snap-in dialog box, choose Certificates, and then choose Add.
  5. In the Certificates snap-in dialog box, choose Computer account, and then choose Next.
  6. In the Select Computer dialog box, choose Local computer, and then choose Finish.
  7. In the Add/Remove Snap-in dialog box, choose OK.
  8. In the left pane of the console, double-click and expand the Certificates (Local Computer).
  9. Right-click Personal, point to All Tasks, and then choose Import.
  10. On the Welcome to the Certificate Import Wizard page, choose Next.
  11. On the File to Import page, choose Browse, locate your certificate file
  12. If the certificate is in a personal information exchange file (.pfx), set the box next to File name to Personal Information Exchange (*.pfx;*.p12), and then browse for the certificate file.
  13. Select the certificate file, and then choose Open, and then choose Next.
  14. If prompted for a password, type the password on the Password page, and then choose Next.
  15. On the Certificate Store page, choose Place all certificates in the following store, and then choose Next.
  16. Choose Finish, and then choose OK to confirm that the import was successful.

Obtaining the Certificate’s Thumbprint

The thumbprint is a string of hexadecimal characters that identifies the certificate. You use the thumbprint when you configure the web service’s port to use the certificate. To perform this task, you continue working in the Certificates snap-in in Microsoft Management Console.

To obtain the certificate’s thumbprint:

  1. In the left pane under Console Root, expand the Certificates (Local Computer) node, expand the Personal folder, and then choose the Certificates folder
  2. The center pane displays all the certificates.
  3. Right-click the certificate that you imported, and then choose Open.
  4. In the Certificate dialog box, choose the Details tab.
  5. Scroll through the list of fields, and then choose Thumbprint.
  6. Copy the hexadecimal characters from the box, and then paste them in a text editor, such as Notepad. These characters make up the thumbprint.

In the text editor, delete all spaces from the thumbprint string.

For example, if the thumbprint is c0 d0 f2 70 95 b0 3d 43 17 e2 19 84 10 24 32 8c ef 24 87 79, then change it to c0d0f27095b03d4317e219841024328cef248779.

Step 5: Configure the certificate

If the certificate has a private key, then you must give the service account of Microsoft Dynamics NAV Server access to the private key.

To grant access to the certificate’s private key to the service account for Microsoft Dynamics NAV Server:

  1. In the left pane of MMC, expand the Certificates (Local Computer) node, expand the Personal node, and then choose the Certificates folder.
  2. In the center pane, right-click the certificate that you imported, choose All Tasks, and then choose Manage Private Keys.
  3. In the Permissions for private keys dialog box, choose Add.
  4. In the Select Users, Computers, Service Accounts, or Groups dialog box, in the Enter the object names to select box, type the name of the service account for Microsoft Dynamics NAV Server, and then choose OK.
  5. On the Security tab, under Allow, select Full Control and Read, and then choose OK.
  6. Copy the Certificate from Personal / Certificate Node.
  7. Paste the certificate into the Trusted Root Certification Authorities/Certificates folder.

Step 6: Configure Service Tier

  1. Open Microsoft Dynamics NAV 2017 Administration
  2. Select your Server Instance (DynamicsNAV100 for example)
  3. Click Edit
  4. Make the following changes in the settings:
  5. Fill “General > Certificate Thumbprint” with the thumbprint of your certificate (no spaces!)
  6. Change “General > Credential Type” to “NavUserPassword”
  7. Change “Client Services > Web Client Base URL” to https://<<full computername>>:443/<<server instance>/WebClient
  8. Check “SOAP Services > Enable SOAP Services” and “SOAP Services > Enable SSL”
  9. Change “SOAP Services > Soap Base URL” to https://<<full computername>>:7047/<<server instance>/WS/
  10. Check “OData Services > Enable OData Services” and “OData Services > Enable SSL”
  11. Change “OData Services > OData Base URL” to https://<<full computername>>:7048/<<server instance>>/OData/
  12. Click Save
  13. Restart the service tier

Step 7: Configure Windows Client

  1. Run Notepad as Administrator
  2. Open file “ClientUserSettings.config” in C:\Users\<<Windows User Name>>\AppData\Roaming\Microsoft\Microsoft Dynamics NAV\100
  3. Update the Parameter ClientServiceCredentialType = NavUserPassword

Step 8: Configure Web Client

  1. Run Notepad as Administrator
  2. Open file “web.config” in C:\inetpub\wwwroot\DynamicsNAV100
  3. Check / update the following parameters:
    1. Server Instance should have the same name as your the service tier you’ve configured
    2. ClientServicePort should have the same value as the service tier
    3. ClientServiceCredentialType should be changed to “NavUserPassword”

Step 9: Add certificate to Web Client

  1. Open IIS and select the Microsoft Dynamics NAV 2017 Web Client site
  2. In the right hand panel, click Bindings.
  3. Add a new binding for type “https” and select your SSL certificate
  4. Click OK

Step 10: Setup Outlook for Financials

  1. Login into the Dynamics NAV Windows client
  2. Navigate to Department > Administration > Application Setup > General > Assisted Setup and click on “Setup Outlook for Financials”
  3. Fill in the needed information (“My Mailbox”, e-mail address and password)
  4. Click Finish!

Step 11: Enjoy!

Woohoo! You’ve done it! The Outlook add-in should now be fully functional in Microsoft Outlook! Fill in your own e-mailaddress on a Customer card and send yourself an e-mail asking about an order or invoice, click on Document Links in the e-mail and and watch the magic happen!

Leave a Reply

Your email address will not be published. Required fields are marked *