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:
- Download the New-SelfSignedCertificateEx.zip file from here
- Extract the zip-file
- Start Windows PowerShell ISE (Start > Windows Powershell > Windows Powershell ISE)
- Probabely Powershell isn’t allowed to run scripts, so execute the following commando: Set-ExecutionPolicy -Scope LocalMachine Unrestricted
- Klik “Run Once”
- Navigate to the folder where you’ve extracted the New-SelfSignedCertificateEx.zip file
- Execute the following commando: Import-Module .\New-SelfSignedCertificateEx.ps1
- 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
- Execute the command. The result will be something like this:
- 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.
- On the computer running Microsoft Dynamics NAV Server, choose Start, and then choose Run.
- In the Open box, type mmc, and then choose OK.
- On the File menu, choose Add/Remove Snap-in.
- In the Add/Remove Snap-in dialog box, choose Certificates, and then choose Add.
- In the Certificates snap-in dialog box, choose Computer account, and then choose Next.
- In the Select Computer dialog box, choose Local computer, and then choose Finish.
- In the Add/Remove Snap-in dialog box, choose OK.
- In the left pane of the console, double-click and expand the Certificates (Local Computer).
- Right-click Personal, point to All Tasks, and then choose Import.
- On the Welcome to the Certificate Import Wizard page, choose Next.
- On the File to Import page, choose Browse, locate your certificate file
- 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.
- Select the certificate file, and then choose Open, and then choose Next.
- If prompted for a password, type the password on the Password page, and then choose Next.
- On the Certificate Store page, choose Place all certificates in the following store, and then choose Next.
- 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:
- In the left pane under Console Root, expand the Certificates (Local Computer) node, expand the Personal folder, and then choose the Certificates folder
- The center pane displays all the certificates.
- Right-click the certificate that you imported, and then choose Open.
- In the Certificate dialog box, choose the Details tab.
- Scroll through the list of fields, and then choose Thumbprint.
- 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:
- In the left pane of MMC, expand the Certificates (Local Computer) node, expand the Personal node, and then choose the Certificates folder.
- In the center pane, right-click the certificate that you imported, choose All Tasks, and then choose Manage Private Keys.
- In the Permissions for private keys dialog box, choose Add.
- 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.
- On the Security tab, under Allow, select Full Control and Read, and then choose OK.
- Copy the Certificate from Personal / Certificate Node.
- Paste the certificate into the Trusted Root Certification Authorities/Certificates folder.
Step 6: Configure Service Tier
- Open Microsoft Dynamics NAV 2017 Administration
- Select your Server Instance (DynamicsNAV100 for example)
- Click Edit
- Make the following changes in the settings:
- Fill “General > Certificate Thumbprint” with the thumbprint of your certificate (no spaces!)
- Change “General > Credential Type” to “NavUserPassword”
- Change “Client Services > Web Client Base URL” to https://<<full computername>>:443/<<server instance>/WebClient
- Check “SOAP Services > Enable SOAP Services” and “SOAP Services > Enable SSL”
- Change “SOAP Services > Soap Base URL” to https://<<full computername>>:7047/<<server instance>/WS/
- Check “OData Services > Enable OData Services” and “OData Services > Enable SSL”
- Change “OData Services > OData Base URL” to https://<<full computername>>:7048/<<server instance>>/OData/
- Click Save
- Restart the service tier
Step 7: Configure Windows Client
- Run Notepad as Administrator
- Open file “ClientUserSettings.config” in C:\Users\<<Windows User Name>>\AppData\Roaming\Microsoft\Microsoft Dynamics NAV\100
- Update the Parameter ClientServiceCredentialType = NavUserPassword
Step 8: Configure Web Client
- Run Notepad as Administrator
- Open file “web.config” in C:\inetpub\wwwroot\DynamicsNAV100
- Check / update the following parameters:
- Server Instance should have the same name as your the service tier you’ve configured
- ClientServicePort should have the same value as the service tier
- ClientServiceCredentialType should be changed to “NavUserPassword”
Step 9: Add certificate to Web Client
- Open IIS and select the Microsoft Dynamics NAV 2017 Web Client site
- In the right hand panel, click Bindings.
- Add a new binding for type “https” and select your SSL certificate
- Click OK
Step 10: Setup Outlook for Financials
- Login into the Dynamics NAV Windows client
- Navigate to Department > Administration > Application Setup > General > Assisted Setup and click on “Setup Outlook for Financials”
- Fill in the needed information (“My Mailbox”, e-mail address and password)
- 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!