One NAV 2017 on Azure - Loaded please...


There is a huge difference in ordering a baked potato and a loaded baked potato.

The potato is the same, but it just becomes so much better will all the add-ons.

So, how would you like your NAV 2017 on Azure?

NAV 2017 on Azure, Loaded please...

of course:-)

This blog post is a visual walkthrough of how to setup NAV 2017 on Azure, Loaded. It consists of a LOT of screenshots explaining what to do...

For assistance on easier navigation, I have added links to the sections here:

  1. Setup your NAV 2017 DEMO environment
  2. Install the Self Signed Certificate
  3. Access NAV 2017 using the Web Client
  4. Add NAV 2017 to the Waffle Menu
  5. Create a PowerBI dashboard with data from NAV
  6. Embedding PowerBI
  7. Configure the Outlook/Office Add-in
  8. Setup Email
  9. Setup Email Logging
  10. Do you want to Edit In Excel
  11. Create your PowerApps
  12. Create a Flow
  13. Access NAV 2017 via a SharePoint Portal
  14. View a world map of your customers
  15. Connect your Phone or Tablet to NAV 2017
  16. Access NAV 2017 using the Windows Client
  17. Connect to your Virtual Machine
  18. That was easy

You can also choose to go through the entire story-like post right here:

Setup your NAV 2017 DEMO environment

Go to http://aka.ms/navdemodeploy

1

The system will redirect you to the new Azure Portal, and you will be asked to login and fill out a quesionnaire. You need to at least fill out Resource Group, VM Name and the admin password.

In order to get your NAV 2017 Fully Loaded, you also want to fill out the BingMaps Key (get one here), select Yes to ClickOnce, select yes to PowerBI and type in the administrator username (email) and password for the Office 365 where you want to integrate NAV 2017. Also say Yes to allow NAV to create a Portal with NAV 2017 Content.

Accept the terms and check Pin to dashboard.
2

Now deployment will start and in approx. 10 minutes you will be looking at this:
5

When Deployment is done, the new Portal will show the deployment and display 1 Succeeded. In the unlikely event it should say 1 Failed, you can click on the link to see what went wrong. It isn't easy, but you will probably get there. Then remove the Resource Group and try again:
6

When you click the Public IP line, the portal will show the DNS name. Click the DNS Name and copy it to the clipboard:
7

Open a new Tab in the browser and navigate to the URL. The browser will probably show you this:
8

But after you refresh a few times, you should end up having the landing page:
9

The landing page here tells you that Installation is still running and you can view the installation status by clicking the link on the right:
10

After around 10-20 minutes, the status should say Installation  Complete:
11

and your Landing page should now be complete:
12

Install the Self Signed Certificate

If you are using a self-signed certificate (if you followed the process here, you are), click the Download Certificate link and follow the process for installing the certificate in the trusted root certificate authorities:
20 21 22 23 24

Note, if you are going to connect to the Virtual Machine with your tablet or your phone, you would need to install the certificate on the device also. You can scan the QR code on the landing page on your device, to navigate to the landing page and download the certificate and the app for your device (link is at the bottom of the landing page).

Access NAV 2017 using the Web Client

On the landing page, in the section with Accessing NAV 2017 using Office 365 authentication, you will find a link to Access Web Client:
12

You will be redirected to the sign-in page. Enter your Office 365 credentials and press Sign in:
25

The first time you login, you will be asked to give permissions to sign you into the NAV Web Client with your credentials:
26

And after that you will open the Web Client:
28

Add NAV 2017 to the Waffle Menu

If you want to have NAV 2017 in your Waffle Menu in Office 365, click the "Waffle" Menu in NAV 2017, which will navigate to your apps. Click the ... menu next to your NAV 2017 app and say Pin to App Launcher:
29

Create a PowerBI dashboard with data from NAV

Navigate to https://powerbi.microsoft.com/en-us/ and sign in with your Office 365 username and password:
46

and press Start:
47

In PowerBI, under Content Pack Library, Services, click Get:49

Search for the NAV Content pack and press GET:
50

Now, for the PowerBI content pack, you will need the OData URL. Open your landing page and click the Get OData Feed Url:51

Copy the Feed Url from the dialog and close it:
52

and in the setup dialog of the PowerBI, you need to paste the URL. Select authentication method Basic and put in your username and password for your admin user. Note: this is NOT your Office 365 username and password, it is the username and password for your NAV user. You can also create a Web Services key in the users dialog in NAV and use that instead of the password.

NOTE: if you are using the UNSECURE endpoint, your username and password will be sent over the wire in clear text and you should never do that with your production system:
53

After a short while, you will have a PowerBI dashboard based on NAV 2017 Data:
54

Embedding PowerBI

Now where you have PowerBI, you want to setup embedded PowerBI in NAV 2017. Start your Web Client like described in the section about starting the Web Client. In the Role Center, Click Actions and select Assisted Setup & Tasks.
31

In the list of Assisted Setup, select Setup Azure Active Directory and go through the Wizard. All values should be pre-populated.

40 41

42

On the Role Center, locate the Power BI Reports at the bottom and click Get Started with Power BI.

43 44

Now, click the Power BI Reports selection and you will see a window with your Power BI Reports. The Reports are by default not enabled.
55

Click the Home menu, Select Edit List
56

Enable the Report and press OK
57

And you will now have an embedded PowerBI report on your Role Center
58

Configure the Outlook/Office Add-in

Start your Web Client like described in the section about starting the Web Client. In the Role Center, Click Actions and select Assisted Setup & Tasks.
31

Select Set up Outlook for Financials to start the setup wizard:
32

Go through the wizard, select your mail (or your organization) and type in your Office 365 username and password:
33 34

35 36

Now navigate to Outlook in Office 365 and send and email to yourself to test the NAV 2017 Add-in.
37

When you click Dynamics NAV the first time, it will ask you to login to NAV 2017 using your Office 365 username and password:
39

Setup Email

Setting up E-mail from NAV 2017 is really easy. Start your Web Client like described in the section about starting the Web Client. In the Role Center, Click Actions and select Assisted Setup & Tasks.
31

In the Assisted Setup list, Select Setup Email. This will guide you through a very easy 4-step wizard, which sets up the E-Mail connection. On Step 3, it is recommended that you click Send Test Mail to check your setup.
65  66

67  68

Setup Email Logging

Setting up E-mail Logging from NAV 2017 is really easy. Start your Web Client like described in the section about starting the Web Client. In the Role Center, Click Actions and select Assisted Setup & Tasks.
31

In the Assisted Setup list, Select Setup Email Logging. This will guide you through an easy 3 step wizard, which sets up Email logging.
69 70

71

Do you want to Edit In Excel

Good news: Everything has already been setup for you. Start your Web Client like described in the section about starting the Web Client. In the Navigation pane on the Role Center, click Customers and select Edit In Excel in the ribbon.
59

Now the devil is always in the detail. You might run into issues if Excel is installed with a different Office 365 account. I had to install Excel on a different machine, using the Office 365 credentials used to setup NAV 2017, which was pretty annoying. When Excel opens, you will have to enable editing:
60

and then sign in to the Excel Add-in:
61

Like with embedded PowerBI, you will have to sign in and give permissions to the Excel Add-in:
62  63

and then you can edit your customers in Excel:
64

Create your PowerApps

So, you want to create PowerApps... - wait no more. Navigate to https://powerapps.microsoft.com/en-us/ and sign in with your Office 365 account:
73

and start your free trial:
74

Wait a few minutes...
75

And now you are ready. Start by adding a New Connection (top right hand corner):
76

In the new connections dialog, add your UNSECURE OData endpoint. On the landing page you can right click the View UNSECURE OData Web Services and copy the link address to the clipboard.

As the Username and password you use your NAV admin username and the password (NOT your Office 365 credentials). Company name is the Company name from NAV, if you are using W1, the company name is CRONUS International Ltd.
77

Having created your Connection, it is time to create your first PowerApp. Press New app and select to use PowerApps Studio for web:79

In the create an app window, press the white right arrow and locate your data/connection:
80

Select your connection and your dataset:
81

and select the Customer table:
82

and wait...
83

Voila, your first PowerApp is ready. Press the Play button in the top right corner:
84

and... here you are - your first PowerApp:
85

Create a Flow

Flows lives in the same area as PowerApps. In order to create a Flow, you need to have a Connection created and you can find information how to do this in the previous section about PowerApps. Click Flows:
86

Create a new Flow and select the Template: Dynamics NAV: When a record is created.
87

Select the Customer table
88

As the next step, select the send email step:
89

Specify the reciever of the email and a text. In the text you can embed fields from the connection:
90

Your new flow is running...
92

and after creating a customer in NAV 2017, I got this email:
93

If this was a session with an audience, I would ask: Does anybody knows why the customer name is empty? and if the audience had been working with NAV for more than just a short time, they would all answer: Because the created trigger is invoked when the record is created, not when you have filled out the fields and pressed OK on the customer card. It might have been a better demo to hook on to the customer modified event in Flow.

Access NAV 2017 via a SharePoint Portal

On the landing page, click the link called Access SharePoint Site.
12

and you will be taken to a SharePoint Portal that looks like this:
95

In the waffle menu, you will find links to your Apps (PowerApps and Flow are still being setup?)
96

And in the Web Client you will find a button in the top right corner, which also will take you to your SharePoint portal:
96

View a world map of your customers

On the landing page, click the link called Show Customer Map.
12

The browser might ask for permission to use your physical location and then show a customer map centered in your current location.
98

When you zoom out, you will see all customers and when you hover over a customer, you will get a link for navigating to the customer in the Web Client.
100

Connect your Phone or Tablet to NAV 2017

In the top left corner of your landing page, you will see a QR code, with the device you want to use, scan that barcode:
barcode

Your device will now navigate to your landing page. At the bottom of the landing page, you will find links to download the NAV 2017 app for your device:
94

Before you open your app and connect to your NAV 2017, you will need to install the self-signed certificate on your device as well. At the top of the landing page, you will find a description on how to do and a link to download the self-signed certificate.

Last, but not least, the easiest way to configure the app on your device to your instance of NAV 2017 is to click the Configure App link on the landing page. It should autoconfigure the app to the URL for NAV 2017.

Note: there are two configure App links. One with Office 365 authentication and one with username/password authentication.
12

Access NAV 2017 using the Windows Client

The Windows Client is available for ClickOnce deployment on the NAV 2017 environment. On the landing page, click the Install Windows Client link under Office 365 authentication (or under username/password authentication). The system will open a page, on which you need to accept the license terms and press install now.

101

The Windows Client will now be installed on your PC using ClickOnce. Read more here.
install1  install2

When the installation is done, you will be asked to authentication and you will now be running the Windows Client locally against a NAV Service Tier on Azure.
windowsclient

Connect to your Virtual Machine

If you need to connect to your Virtual Machine, then you will find a link to a Remote Desktop connection to your Virtual Machine (server1) on the landing page. Click that and login with your Virtual Machine Administrator username and password.
14

easy

BTW - if you ever succeeded in setting up all of this without the Gallery image, please write in the comments how much time it took, from start to finish... (or maybe how much time it took to get some of the way:-)) - we can multiply this with a lot of people - to see how much time people actually save by using the NAV 2017 image on Azure.

Enjoy

Freddy Kristiansen
Technical Evangelist

Comments (29)

  1. Hi Freddy

    I had a small pull request for the 2016 demo custom template in GitHub. would that be included as well in your 2017 ? (was about additional regions mainly).
    By the same token, I agree that the image and DEMO scripts are excellent but is there a way to get them converted in the image to use ARM rather than ASM ?
    I believe Microsoft is moving away from ASM and for example it will not be available in any CSP based subscriptions.

    Cheers
    Manu

    1. FreddyDK says:

      I am not sure how much inside the image is ASM, but I will be moving things away from ASM to ARM over time as I have the time for that.

      Reg. the 2016 pull request, I haven't received any and I wouldn't be transferring stuff to NAV 2017.
      If you were to clone the project and create your own version and submit a pull request, you would have to do that for NAV 2017 also, sorry.

      /Freddy

      1. Done as your friend Joerg was hassling for this :).

        Cheers
        Manu

  2. Tony says:

    Hi Freddy - First thing first: BIG THANK YOU! Two years ago when I try implement the O365 login, it took me DAYS.

    I tried to follow this post and get the error when doing the Bing maps:
    ERROR (BingMaps): Exception calling "GeocodeAll" with "0" argument(s): "A call to System.Net.WebClient.DownloadString failed with this message: The remote server returned an error: (401) Unauthorized."

    After I change the Bing map application URL from https://publicdns/AAD/WebClient/map.aspx to https://publicurl:7047/NAV/WS/CRONUS%20USA,%20Inc./Codeunit/BingMapsSetup and run the BingMaps powershell manually, I got this error:
    Could not upgrade the NAV extension 'BingMaps Demo' due to the following error: 'Object of type CodeUnit with ID 52001 could not be found.'.

    Which is the same error when I install the Bing Map App from the Extension Management. Please help. thanks.

    1. Tony says:

      And, when click "Edit in Excel", got the error "There was an error loading the object."

      1. FreddyDK says:

        Not sure what is wrong here. I has problems in Excel when I was logged in as a different user than the user I used in NAV. I also have not tried this with earlier versions of Excel than 2016, I don't know if it is supposed to work.

        1. Tony says:

          However, in CU1 image, still get "There was an error loading the object." when click "Edit in Excel" from item list.

          (I deployed the azure VM with the CU1 image: $pubName="MicrosoftDynamicsNAV", $offerName="dynamicsnav", $skuName="2017", $version="10.0.14200". And initialized and executed the ps script for O365) Any suggestions? Thanks.

          1. FreddyDK says:

            Are you logged into excel as the same O365 user as you use for logging into NAV?
            Are you logged into NAV using AAD authentication and not username/password?

          2. Tony says:

            yes and yes.

    2. FreddyDK says:

      I will make the BingMaps extension more error proof in the next version, so that it shouldn't hold up anything.

      1. Tony says:

        Bing maps works well in the CU1 image. Thank you.

  3. Mohamad El-Sadek says:

    Freddy,

    I can't remember the last time I tried a step-by-step demo from a MS rep and worked so brilliantly. Mind you, I hit a few unexpected surprises (the "In the unlikely event it says 1 Failed..." greeted me on two consecutive tries). In one of those two failed attempts I was able to setup IIS, and NAV 2017 installation script started as planned. Per your suggestion, I turned on BingMapKeys. Suddenly about 20 minutes into the initialization script, I received a fatal error saying "401 Unauthorized access" for my BingMapKey. Even though I signed up for the BingMaps website and retrieved the correct key. I eventually nuked the Resource Group and restarted again but this time without the BingMapKey.

    The second failed attempt was in me attempting to install it in the Central Canada server location. Turns out that NAV 2017 deployment template uses a Server Tier (D2? D3?) that's not available in Canada, so I had to resort to using Eastern US, and that worked.

    Once I got through this initial hiccup, I was able to setup the e-mail logging, Outlook integration.

    Last note/question: When I click Edit in Excel, I get a terse "There was an error loading the object." with just an OK button. Do you know what this means?

    Thanks.

    Mohamad

    1. FreddyDK says:

      Thanks for the info. I will make the BingMaps extensions more error proof in the next version (CU1 coming up). I am not sure what is wrong on the Edit in Excel part, I has problems when I was logged in as a different user than the user I used in NAV. I also have not tried this with earlier versions of Excel than 2016, I don’t know if it is supposed to work.

  4. Ian Wilson says:

    Thanks Freddy. A fantastic time saver!

  5. Manu says:

    Hi Freddy,
    Sorry for my English
    In step O365 Integration I receive this error:

    The property 'Id' cannot be found on this object. Verify that the property exists.
    At C:\DEMO\O365 Integration\HekperFunctions.ps1:159 char:5
    + $asUserObjectId= $adUser.Id
    +
    ...
    I have one Msdn Azure Suscription and for the integration with office 365 I have created a tenant demo.
    I don't know if I have to do some configuration in Azure, in Office365, in Nav, in User Nav,....
    Can you help me?
    Thanks!

    1. FreddyDK says:

      The Office 365 Admin user that you specify needs to be an admin in a Office 365 subsciption (or trial) - that might not be the same as your Azure AAD username/password

  6. Stuart Allen says:

    Hi Freddy

    Just trying this today, an hit a small problem with the Bing Maps integration. I tried again just using the BingMaps script in the c:\demo folder and got the same error - I get:

    Exception calling "SetBingMapsKey" with "1" argument(s): "The length of the string is 108, but it must be less than or equal to 80 characters. Value: CG0kV4Xu5rvRM6Oaw1Qb
    ~BywCy6v3zO2sLK6p9NmckA~AqMVYc6yihRhW-XjlM11GfWQHSIecwcGID4ya-nmpgEkGN6KVKYlGqcQ8sPqeHk5" (at , C:\DEMO\BingMaps\install.ps1: line 134)

    Cheers
    Stuart

    1. FreddyDK says:

      The BingMaps Key field in the database is 80 characters long - I have only seen keys of 64 characters.
      My key was created as a basic key with the following settings:
      Application Url: http://www.freddy.dk
      Key type: Basic / Public website
      Created date: 02/23/2011
      Expiration date: None
      Key Status: Enabled
      I don't know if other keys can be longer, but try to create one for a public website.

  7. Hunter WIlson says:

    Hi Freddy,

    I ran into a small issue with the installation. I keep getting the following messages.

    3:27:26 AM SharePoint URL must be formed like: https://tenant.sharepoint.com
    3:27:26 AM SharePoint Base URL (example: https://cronus.sharepoint.com) : default

    Could you please advise?

    Thanks,

    1. FreddyDK says:

      Not sure where you get this error, but it seems like you have specified a Office 365 username and password in the deployment template and the deployment script cannot find your SharePoint Url. If you deploy NAV without Office 365 integration and then from PowerShell ISE (after the deployment) run the script c:\demo\O365 Integration\install.ps1 - then you will get some more questions (one being SharePoint Base Url) where you can specify the base url for your sharepoint. When you use the deployment template it just takes the default, thinking that it can figure that out automatically (which it normally can:-))

  8. René Gubler says:

    Hi Freddy
    Does the Excel Add-In also works without an O365 Account? The Excel AddIn asks for the server URL. But which? The odata? I tried different, get the login screen but always end in an error. Failed to retrieve the server config, Details: Failed to load

    1. FreddyDK says:

      I don't think so. The Excel Add-in is primarily used for (I think) Edit In Excel from inside NAV - I don't think you can load the app in excel and connect to NAV.

  9. Ian Wilson says:

    Hi Freddy,

    Using the CU3 image deployed on Server 2016, the Bing Maps Fact Box is just an empty grey box when RDC's on to the server and using the Windows Client. The Web Client shows the maps ok.

    If I install the Windows Client on my local PC using ClickOnce, the Bing Maps fact box works as expected.

    1. FreddyDK says:

      I did notice this, must be some IE settings on the server. Will see if I can find a fix.

  10. mouli says:

    Hi Freddy,

    I tried your script to create Office 365 with existing Dynamics NAV 2017 cu3 GB database , Script executed successfully but in my portal it is showing below error.

    Can 99999
    Type: Microsoft.Dynamics.Nav.Types.NavPageBuildErrorException
    Message: Cannot build the page 51402.
    The metadata object Page 51402 was not found.
    StackTrace:
    at Microsoft.Dynamics.Nav.Client.FormBuilder.BuilderSession.CreateLogicalForm(Int32 formId, FormState formState, Int32 retryCounter)
    at Microsoft.Dynamics.Nav.Client.NavRunPagePropertyBagInvokedAction.InvokePropertyBagAction(UISession uiSession)
    at Microsoft.Dynamics.Nav.Client.NavPropertyBagInvokedActionBase.InvokeCore(LogicalControl logicalControl, Object state, UISession uiSession)
    Source: Microsoft.Dynamics.Nav.Client.Builder----------------------------------

    Regards
    Mouli.K

    1. FreddyDK says:

      Sounds like the O365 extension wasn't properly installed. I will test GB again and if the error is there, I will fix it for CU5.

  11. Jon Cooper says:

    Hi, Freddy. Really great article. I have deployed the VM and switched to Azure SQL using the included script. However, I'm now having trouble publishing extensions. When I use Publish-NAVApp, I get "Publish-NAVApp : Failed to connect to server ". If I include Sandbox parameters, after a while, I get "Publish-NAVApp : Login failed for user ''." What's the correct way to publish an extension to a database on Azure SQL (or what am I doing wrong)?

    Thanks!

    Jon

    1. FreddyDK says:

      Apps needs to be published before you move to azure SQL. Alternatively you can modify the code to setup a sandbox database when publishing - that should take care of that.
      I might do that in the future.

Skip to main content