4. Dynaway Mobile Setup

Deploy and test the Mobile Client website

Introduction

This section describes the steps required to deploy a mobile website, which is used on the Mobile Clients.

Prerequisites

You have completed mobile setup for D365FO, as described in the section above.

Audience
Sysadmin, Partner Consultant

Deployment Scenarios

The first time you deploy a mobile website, follow the steps described in the four articles below in sequential order:

  1. Create an Azure storage account (optional - only required if you want to manage large files on the Mobile Client)
  2. Add Web App
  3. Web application registration on Azure Active Directory
  4. Configure and upload the mobile site:
    1. Configure the mobile site
    2. Configure attachments
    3. Upload the mobile site

When you create Azure resources, we recommend that you create a dedicated resource group for each purpose (example: one resource group for development and test, and one resource group for production).

Create an Azure Storage Account

This step is optional.

An Azure storage account is required for interfacing with Dynamics 365 for Finance and Operations environments. The storage account is used as a temporary storage when uploading attachments from the mobile devices, such as images and pdf files. The storage account is only required if you want to manage large files on the Mobile Client.

If you're going to use attachments that are less than 20 MB in size per file, skip this section. You only need to create an Azure storage account if you expect to use attachments with a file size larger than 20 MB per file on the Mobile Client.

For additional information about Azure Blob storage setup and file size limitations, refer to the "appSettings" table and the text below the table in the article Configure the mobile site. The following app settings must be left blank if you skip the setup in this section:

  • ax7StorageAccountName
  • ax7StorageAccountKey

In a cloud hosted environment (T1), for DEV and TEST purposes, the General-purpose Azure storage account that is deployed with the Dynamics 365 for Finance and Operations environment can be used. Typically, the storage account can be identified by the resource group associated with the Azure environment.

  1. Navigate to Storage accounts.
  2. Select Add. These are the recommended settings:
    1. Storage account type: General-purpose
    2. Replication: Locally redundant storage (LRS)

Add the Web App

The Azure installation consists of an Azure client deployment package. The deployment package is installed on an Azure website connected to the application registration.

  1. On https://portal.azure.com/ , log in with your Windows Azure credentials (View screenshot 01 for reference).
    • Create a website in Azure by creating a Web App.
    • Select + Create a resource.
    • Find and select Web > Web App.
    • Create a dedicated resource group (recommended).
    • Select a name that is related to your company (Example: "[company name]-dev").
    • Under Publish, select Code.
    • Under Runtime stack select the ASP.NET V4.8.
    • Under Operating System select Windows.
    • Under Region select the region related to the physical data centre on which the new mobile website is created.
    • Under Pricing plans select your desired plan.
    • Click Next until you reach the DEPLOYMENT tab.
    • Under Basic authentication select Enable.
    • Click Next until you reach the REVIEW + CREATE tab.
    • Click on Create.
  2. Wait for the resource to deploy and navigate to the new App Service and click on Go to resource.
  3. In Overview, copy the URL of the default domain and add https:// at the beginning (View screenshot 02 for reference). You will need to use this in a later step.
  4. Create one or more virtual applications (View screenshot 03 for reference).
    • Each Dynamics 365 for Finance and Operations environment requires a dedicated mobile client installation. You may have license for the Dynaway Work execution app, Dynaway Floor plan app, and Dynaway Scheduling board app, each of which requires its own virtual application.
    • Go to Settings > Configuration.
    • Go to Path mappings.
    • Click + New virtual application or directory.
    • Under Virtual path input:
      • /work for the work execution application.
      • /scheduling for the scheduling board application.
      • /floor-plan for the floor plan application.
    • Under Physical path input:
      • site\wwwroot\work for the work execution application.
      • site\wwwroot\scheduling for the scheduling board application.
      • site\wwwroot\floor-plan for the floor plan application.
    • Uncheck the Directory checkbox (See screenshot 4 with an example from work execution).
    • Go to Deployment > Deployment center.
    • Go to FTPS credentials.
    • Copy the FTPS endpoint, FTPS Username, and Password.
    • Connect with the FTP Server (View screenshot 05 for reference).
    • Navigate to site\wwwroot.
    • Create directories as required.
      • work for the work execution application.
      • scheduling for the scheduling board application.
      • floor-plan for the floor plan application.

01: Create web app.
01: Create web app.
02: Copy the value and add https://.
02: Copy the value and add https://.
03: Create virtual applications.
03: Create virtual applications.
04: The 'Add virtual application or directory' dialog.
04: The 'Add virtual application or directory' dialog.
05: Connect with FTP Server and create two folders.
05: Connect with FTP Server and create two folders.

Web Application Registration

Before you set up the Azure mobile site for the Mobile Client, you must first make a web application registration. The Azure web application registration ensures that the Mobile Client web app has security permissions to access Dynamics 365 for Finance and Operations.

Some steps regarding creating a web application registration require that you're set up as an 'Azure Global Administrator'.

Refer to this article from Microsoft for more information on how the Mobile Client is integrated with the Azure Active Directory https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app.

  1. Select the link https://portal.azure.com to open Microsoft Azure Dashboard.
  2. Navigate to Navigate to Microsoft Entra ID.
  3. Select Select Manage > App registrations, and select the + New registration button.
  4. In the Name field, insert the name of your Mobile Client. Examples: "Mobile AM Prod" and "Mobile AM Test-01".
  5. Under Redirect URI (optional) select 'Single-page application (SPA)' in the drop-down, and enter your prepared website URL, e.g. https://my-web-app-default-domain.azurewebsites.net/work/login/success.
    This URL must be the same as when setting up the Azure Mobile Site, described in the article Add the Web App, taken from Overview and added https://
  6. Select Register and wait for the resource to deploy.
  7. Navigate to App registrations settings.
  8. Select API permissions from the settings menu.
    1. Select Add permission > Dynamics ERP (see screenshot 01).
    2. Select Application permissions.
    3. Select one permission: Connector.FullAccess.
    4. Select Add permission.
    5. Select Add permission > Microsoft Dynamics ERP.
    6. Select Delegated permissions.
    7. Select two permissions: AX.FullAccess and CustomService.FullAccess.
    8. In API permissions > Grant consent, select Grant admin consent for... and select "Yes" on the pop-up screen. This step requires you to be an 'Azure Global Administrator'.
  9. Select Overview from the settings menu.
    1. Find and copy the Application (client) ID for your mobile client application. You'll use this Application ID to set up the Azure mobile site, described in the article Add the Web app.
  10. Go to Manage > Authentication and,
    • Under Single-page authentication > Redirect URLs, add the redirect URLs as below (see screenshot 02):
      • https://[company] name-dev.azurewebsites.net/work/login/success
      • https://[company] name-dev.azurewebsites.net/safe/login/success
      • https://[company] name-dev.azurewebsites.net/plan/
      • https://[company] name-dev.azurewebsites.net/floor-plan/login/success
    • Under Implicit grant and hybrid flows (see screenshot 03) enable the checkboxes corresponding to Access tokens (used for implicit flows) and ID tokens (used for implicit and hybrid flows).

01: Select 'Dynamics ERP' permission.
01: Select 'Dynamics ERP' permission.
02: Add redirect URLs.
02: Add redirect URLs.
03: Enable options for 'Implicit grant and hybrid flows'.
03: Enable options for 'Implicit grant and hybrid flows'.

Get Dynaway Web Application

Go to LCS.dynamics.com -> your project -> Asset Liblary and Download the package with the mobile app.

Download Dynaway mobile webapp
Download Dynaway mobile webapp

Configure the Mobile Site

When you've set up the Azure mobile site, created the web application registration, and uploaded the mobile deployment files, the next step is to upload the Mobile Client application files.

  1. Extract the mobile installation files (from the zip file).
  2. Locate the web config file, and edit it in a text editor. Go to the <appSettings> section, and change the settings in the table below to your current settings. The table below only shows examples.
App setting Example value Description
ax7Url

<add key="ax7Url"
value="https://contoso-test.sandbox.operations.
dynamics.com
" />

The URL for the Dynamics 365 for Finance
and Operations environment.

ax7ClientId

<add key="ax7ClientId"
value="b097fac0-deae-4959-9791-53bcb40a9909" />

This ID is the application ID of your App registration,
and it can be found in the Azure portal by navigating
to Microsoft Azure Portal > Microsoft Entra ID > Manage > App registrations > Application ID.
Refer to the last step (step 10) in the
section Web application registration.
axDomain <add key="axDomain" value="contoso.com" />

Define the Active Directory domain name for the users
who should be able to log in on the Mobile Client.

ax7Storage
AccountName

An Azure Blob Storage account name.

Values are stored in Azure Portal > Storage Accounts
> Azure Blob Storage account > Access keys.

For more information on creating a storage account,
if an account is not readily available, refer to Microsoft
documentation: Create a storage account.

ax7Storage
AccountKey

An Azure Blob Storage account key. It is recommended
to use the secondary key. This could be the account key
of the Azure Blob Storage associated with your
Dynamics 365 for Finance and Operations account.

Values are stored in Azure Portal > Storage Accounts
> Azure Blob Storage account > Access keys.

If the settings 'ax7StorageAccountName' and 'ax7StorageAccountKey' are left blank, there is a limitation of 18-20 MB per file. The IIS service running Dynamics 365 for Finance and Operations sets the limit. We recommend that you do not adjust these settings in a running environment.

Step 1: Extract files
Step 1: Extract files
Step 2: Storage account name and key
Step 2: Storage account name and key

Upload the Mobile Site

Use an FTP client with the specified credentials and URL described in the article. Add the Azure app to upload the mobile client application files.


1. Download the package from LCS, and extract internal files.
2. Go to Azure app service --> deployment center, copy & paste credentials, and connect to the FTP server.
3. Verify web.config file for Dynaway web client: Work execution, Scheduling board, Floor plan.
4. Upload the newest files to the FTP localization.

The files to be uploaded are located in the .zip file. The zip package can be downloaded from lcs.dynamics.com, as shown in the screenshot below.
Drag and drop files to the FTP /work, /scheduling and /floor-plan directory. Make sure the web.config file is up to date.

Download Dynaway webapp files from lcs.dynamics.com
Download Dynaway webapp files from lcs.dynamics.com
Azure app services ftp connection details
Azure app services ftp connection details
Work execution, Scheduling board and Floor plan apps
Work execution, Scheduling board and Floor plan apps
Use the newest web.config file and update values
Use the newest web.config file and update values
Upload files to the FTP Server
Upload files to the FTP Server

Copyright Dynaway A/S

Privacy Policy