Create a Function App

Objective

An Azure Function App is a serverless solution that allows you to write less code, maintain less infrastructure, and save on costs. Instead of worrying about deploying and maintaining servers, the cloud infrastructure provides all the up-to-date resources needed to keep your applications running. In this tutorial, you will learn how to create a function app, in order to use the Datafox integration.

Prerequisites

Click Through

Part 1: Create Function App
  • Start in portal.azure.com
  • Under Azure Services, click on Function App (for this step you need an Azure subscription)
  • Make sure the subscription filter is set to all, then click Apply
  • Click on Create
  • Select Consumption (pay as you go)
  • Click on select
  • Make sure that a Subscription is selected
  • Click on Create new below the name of the Resource Group, name it as ["customername"_datafoxfunctionapp] and confirm with OK
  • Add a Function App Name
  • Select Runtime stack -.NET
  • Select Version 4.8 isolated worker model
  • Add the region you're in 
  • The operating system should be Windows
  • Click on Next
  • Click on Review + create
  • Click on Create
  • Wait until the deployment is complete. This may take up to a few minutes.
  • You can now click on Go to resource to have an overview of the process

Part 2: Add Connection Strings

  • Under Settings (left side menu), click on Environment Variables
  • Go to the tab Connection Strings
  • Click on + Add
  • Add the name: Dynamics365ConnectionString
  • For the value: there are two options – Multi Factor Authentication (Client Secret) or OAuth.
    • If you use Multi Factor Authentication in your organization, add the following line to "Value":
      AuthType=ClientSecret;Url=[OrgUrl];ClientId=[ApplicationID];ClientSecret=[Secret]
    • In that line, replace the placeholders as follows:
      • OrgUrl = URL of your Dynamics 365 Environment, should be copied in this format: https://"name".crm4.dynamics.com
      • ClientId = Client ID created during the App Registration
      • ClientSecret = Secret ID created during the APP Registration.
    • Set the Type to Custom
    • Click on Apply
    • Click on Apply again
    • Click on Confirm
    • If you don't use Multi Factor Authentication in your organization, then use OAuth
    • With OAuth, add the following line to "Value":
      AuthType=Oauth;Username=[username];Password=[password];URL=[OrgURL];AppID=51f8…
    • In that line, replace the placeholders as follows:
      • [username]= The user account that is used to establish the connection. This can be a special account used only for this purpose.
      • [password] = The user accounts password
      • [OrgUrl] = URL of your Dynamics 365 Environment, should be copied in this format: https://"name".crm4.dynamics.com
    • Set the Type to Custom
    • Save
  • In the left side menu under settings, click on Configuration 
  • Go to the tab General Settings
    • Switch the SCM Basic Auth Publishing Credentials to On
    • Switch Web sockets to On
  • Save and confirm by clicking Continue

Part 3: Send Publish Profile to Hubdrive

  • In the left side menu, click on Overview
  • Click on Get publish profile on the ribbon
  • Copy the file that was downloaded
  • Go to Hubdrive's Customer Portal
  • Submit the file via ticket
  • Hubdrive will contact you after the deployment is done

Result

After submitting the downloaded file to Hubdrive, we will deploy the App for you. After the deployment has been done, the last step of the setup is to run a test.
Image
HR