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:
- Setup your NAV 2017 DEMO environment
- Install the Self Signed Certificate
- Access NAV 2017 using the Web Client
- Add NAV 2017 to the Waffle Menu
- Create a PowerBI dashboard with data from NAV
- Embedding PowerBI
- Configure the Outlook/Office Add-in
- Setup Email
- Setup Email Logging
- Do you want to Edit In Excel
- Create your PowerApps
- Create a Flow
- Access NAV 2017 via a SharePoint Portal
- View a world map of your customers
- Connect your Phone or Tablet to NAV 2017
- Access NAV 2017 using the Windows Client
- Connect to your Virtual Machine
- 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 https://aka.ms/navdemodeploy
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.
Now deployment will start and in approx. 10 minutes you will be looking at this:
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:
When you click the Public IP line, the portal will show the DNS name. Click the DNS Name and copy it to the clipboard:
Open a new Tab in the browser and navigate to the URL. The browser will probably show you this:
But after you refresh a few times, you should end up having the landing page:
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:
After around 10-20 minutes, the status should say Installation Complete:
and your Landing page should now be complete:
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:
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:
You will be redirected to the sign-in page. Enter your Office 365 credentials and press Sign in:
The first time you login, you will be asked to give permissions to sign you into the NAV Web Client with your credentials:
And after that you will open the Web Client:
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:
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:
In PowerBI, under Content Pack Library, Services, click Get:
Search for the NAV Content pack and press GET:
Now, for the PowerBI content pack, you will need the OData URL. Open your landing page and click the Get OData Feed Url:
Copy the Feed Url from the dialog and close it:
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:
After a short while, you will have a PowerBI dashboard based on NAV 2017 Data:
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.
In the list of Assisted Setup, select Setup Azure Active Directory and go through the Wizard. All values should be pre-populated.
On the Role Center, locate the Power BI Reports at the bottom and click Get Started with Power BI.
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.
Click the Home menu, Select Edit List
Enable the Report and press OK
And you will now have an embedded PowerBI report on your Role Center
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.
Select Set up Outlook for Financials to start the setup wizard:
Go through the wizard, select your mail (or your organization) and type in your Office 365 username and password:
Now navigate to Outlook in Office 365 and send and email to yourself to test the NAV 2017 Add-in.
When you click Dynamics NAV the first time, it will ask you to login to NAV 2017 using your Office 365 username and password:
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.
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.
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.
In the Assisted Setup list, Select Setup Email Logging. This will guide you through an easy 3 step wizard, which sets up Email logging.
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.
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:
and then sign in to the Excel Add-in:
Like with embedded PowerBI, you will have to sign in and give permissions to the Excel Add-in:
and then you can edit your customers in Excel:
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:
And now you are ready. Start by adding a New Connection (top right hand corner):
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.
Having created your Connection, it is time to create your first PowerApp. Press New app and select to use PowerApps Studio for web:
In the create an app window, press the white right arrow and locate your data/connection:
Select your connection and your dataset:
and select the Customer table:
Voila, your first PowerApp is ready. Press the Play button in the top right corner:
and... here you are - your first PowerApp:
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:
Create a new Flow and select the Template: Dynamics NAV: When a record is created.
As the next step, select the send email step:
Specify the reciever of the email and a text. In the text you can embed fields from the connection:
and after creating a customer in NAV 2017, I got this email:
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.
and you will be taken to a SharePoint Portal that looks like this:
In the waffle menu, you will find links to your Apps (PowerApps and Flow are still being setup?)
And in the Web Client you will find a button in the top right corner, which also will take you to your SharePoint portal:
View a world map of your customers
On the landing page, click the link called Show Customer Map.
The browser might ask for permission to use your physical location and then show a customer map centered in your current location.
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.
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:
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:
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.
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.
The Windows Client will now be installed on your PC using ClickOnce. Read more here.
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.
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.
[audio m4a="https://msdnshared.blob.core.windows.net/media/2016/11/ThatWasEasy.m4a" preload="metadata"][/audio]
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
- Anonymous
November 20, 2016
Hi FreddyI 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.CheersManu- Anonymous
November 21, 2016
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- Anonymous
November 29, 2016
Done as your friend Joerg was hassling for this :).CheersManu
- Anonymous
- Anonymous
- Anonymous
November 21, 2016
Great post. - Anonymous
November 22, 2016
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.- Anonymous
November 22, 2016
And, when click "Edit in Excel", got the error "There was an error loading the object."- Anonymous
November 28, 2016
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.- Anonymous
December 14, 2016
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.- Anonymous
December 15, 2016
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? - Anonymous
December 20, 2016
yes and yes.
- Anonymous
- Anonymous
- Anonymous
- Anonymous
November 28, 2016
I will make the BingMaps extension more error proof in the next version, so that it shouldn't hold up anything.- Anonymous
December 14, 2016
Bing maps works well in the CU1 image. Thank you.
- Anonymous
- Anonymous
- Anonymous
November 22, 2016
The comment has been removed- Anonymous
November 28, 2016
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.
- Anonymous
- Anonymous
November 25, 2016
Thanks Freddy. A fantastic time saver! - Anonymous
November 29, 2016
Hi Freddy,Sorry for my EnglishIn 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!- Anonymous
December 02, 2016
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
- Anonymous
- Anonymous
December 15, 2016
The comment has been removed- Anonymous
December 15, 2016
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.dkKey type: Basic / Public websiteCreated date: 02/23/2011Expiration date: NoneKey Status: EnabledI don't know if other keys can be longer, but try to create one for a public website.
- Anonymous
- Anonymous
January 03, 2017
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.com3:27:26 AM SharePoint Base URL (example: https://cronus.sharepoint.com) : defaultCould you please advise?Thanks,- Anonymous
January 08, 2017
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:-))
- Anonymous
- Anonymous
January 06, 2017
Hi FreddyDoes 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- Anonymous
January 08, 2017
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.
- Anonymous
- Anonymous
February 21, 2017
The comment has been removed- Anonymous
February 25, 2017
I did notice this, must be some IE settings on the server. Will see if I can find a fix.
- Anonymous
- Anonymous
March 08, 2017
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 99999Type: Microsoft.Dynamics.Nav.Types.NavPageBuildErrorExceptionMessage: 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----------------------------------RegardsMouli.K- Anonymous
March 27, 2017
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.
- Anonymous
- Anonymous
March 08, 2017
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- Anonymous
March 27, 2017
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.
- Anonymous
- Anonymous
September 28, 2017
Hi Freddy, thanks for the very interesting and useful post. During the process to create a new Flow for entering data into NAV I run into a problem. The Action in Microsoft flow does not accept the OData WebService URL (in a browser I'm able to open the link). Flow shows the following error message:UNSECURE/OData/' is not a valid Microsoft Dynamics NAV OData feed URL.The OData feed URL can be found on the 'Web Services' page in Microsoft Dynamics NAV. clientRequestId: 4517dfca-0fd6-414b-8bd2-84aeb4c9f65f-selfThis happen even if I try to create the Flow from the VM in Azure. Do you have any advice? Thanks and regardsBastian- Anonymous
October 27, 2017
I am sorry, yeah, things might have changed - but based on the error message, it sounds like you have just not installed the unsecure web services tier (run c:\demo\install powerbi.ps1)
- Anonymous
- Anonymous
October 07, 2017
Hi, Freddy. Really great work. There is lot to learn & practice in this article. - Anonymous
November 13, 2017
The comment has been removed - Anonymous
November 15, 2017
The comment has been removed- Anonymous
December 06, 2017
A change in the Azure AD authentication API broke the integration script - has been fixed now.- Anonymous
December 07, 2017
The comment has been removed- Anonymous
December 07, 2017
Hi Freddy - I was able to get through the scripts manually - I had to edit the clientusersettings.config in programdata to NavUserPassword as well as in the web.config. I also had to create a local admin to match the NAV user and run the app pool under that user. The only issue I am having now is Bing maps integration was reported as successful but I don't see it in web or windows client. Is there additional work to make it show up? I don't see it as an option to add the factbox either. Thank you! Sara- Anonymous
December 07, 2017
BingMaps changed their javascript control and I didn't get it updated yet.Will do this as part of the move to NAV 2018 and docker based azure VMs.
- Anonymous
- Anonymous
- Anonymous
- Anonymous
- Anonymous
December 04, 2017
The comment has been removed- Anonymous
December 06, 2017
Should be fixed now - a change in the Azure AD API broke the integration script
- Anonymous
- Anonymous
December 06, 2017
The comment has been removed- Anonymous
December 06, 2017
A change in the Azure AD integration API broke the integration script, should be fixed now.
- Anonymous