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

There are two deployment scenarios. Use the scenario that applies to your company.

Scenario 1

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 the Azure app (App Service)
  3. Web application registration on Azure Active Directory
  4. Configure and upload the mobile site:
    1. Configure the mobile site
    2. Configure attachments
    3. Update the web manifest file
    4. 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).

Scenario 2

If you upgrade a mobile website from version 2008.0 or a previous version, do the following:

  1. Open the mobile app registration.
  2. Go to Authentication.
  3. You see a link on the Web tab with a text similar to "This app has implicit grant settings enabled. If you are using any of these URIs in a SPA with MSAL.js 2.0, you should migrate URIs". Select the link and follow the steps.
  4. Proceed with steps 9-10 in the step-by-step procedure in the article Web application registration to complete the upgrade process.
  5. Configure and upload mobile site:
    1. Configure the mobile site
    2. Configure attachments
    3. Update the web manifest file
    4. Upload the mobile site

Scenario 2 > Step 3: Migrate URIs
Scenario 2 > Step 3: Migrate URIs

Azure Storage Account

(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

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)

Application Service

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.
  2. Create a website in Azure by creating a Web App. In Azure, select App Services.
  3. Select Create +.
  4. Create a new Web App. The App name must be globally unique. Select a name that is related to your company (Example: "[company name]-eam-dev").
    1. Create a dedicated resource group (recommended).
    2. Select the latest ASP.NET runtime V4.8 stack, and the Operating System setting is automatically assigned to "Windows".
    3. In the Region field, select the region related to the physical data centre on which the new mobile website is created.
    4. Click "NEXT" till the DEPLOYMENT tab. Select "Basic authentication" to "ENABLED".
    5. Deploy app service.
  5. Wait for the resource to deploy and navigate to the new App Service.
    1. Copy the URL. You'll use it in a later step.
  6. Create one or more virtual applications (optional).
    1. Each Dynamics 365 for Finance and Operations environment requires a dedicated mobile client installation. If multiple mobile client installations are deployed under the same Azure Web Service, each Mobile Client installation must be set up as a virtual application.
  7. In the App Services menu, select Deployment Center and select "FTP" as the deployment option.
    1. Copy the FTP URL and the App Credentials user name and password, connect with the server and create two directories inside of site\wwwrooot:
      work
      plan

Step 4: Create new Web App.
Step 4: Create new Web App.
Step 6: Create virtual applications.
Step 6: Create virtual applications.
Step 7: Connect with FTP Server and create two folders
Step 7: Connect with FTP Server and create two folders

Application registrations

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 Azure Active Directory.
  3. Select App registrations, and select the New registration button.
  4. In the Name field, insert the name of your Mobile Client. Examples: "Mobile EAM Prod" and "Mobile EAM Test-01".
  5. Select "Single-page application (SPA)" in the drop-down.
    1. This URL must be the same as when setting up the Azure Mobile Site, described in the article Add the Azure app. The sign-on URL must contain the complete URL to the mobile client's leading site:
      "https://example.azurewebsites.net/work/login/success" or the Work Execution app
      "https://example.azurewebsites.net/plan/" for the Planning Board app
    2. Dynaway+ must be copied to the directory "work"
  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.
    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 Azure app.

Step 5: Select
Step 5: Select "SPA" in drop-down.
Steps 8: Select
Steps 8: Select "Dynamics ERP" permission.
Step 9: Check redirect URIs.
Step 9: Check redirect URIs.

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 > Azure Active Directory
> 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.

Please remove the value from the web.config file if not used.

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.

Please remove the value from the web.config file if not used.

isMSAM Set to "false"

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

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.

The files to be uploaded are located in the .zip file.

Where to find FTP access
Where to find FTP access
Upload Work Execution and Planning Board to /work and /plan directories (FTP server)
Upload Work Execution and Planning Board to /work and /plan directories (FTP server)

Login Test

This article describes how you can test the connection from the Mobile Client to Dynamics 365 for Finance and Operations.

  1. Navigate to your mobile site in a browser by using the URL you copied in step 5.a. in the article Add the Azure app.
  2. Log in with your Active Directory credentials.

Copyright Dynaway A/S

Privacy Policy