Use your own custom Azure Machine Learning algorithms in Demand planning

If you're already using your own Microsoft Azure Machine Learning algorithms for demand forecasting in Dynamics 365 Supply Chain Management (as described in Demand forecasting overview), you can continue to use them while you use Demand planning in Microsoft Dynamics 365 Supply Chain Management.

This article describes the setup that is required to enable Demand planning to connect to your Azure Machine Learning workspace.

Set up a new Microsoft Entra application

Follow the steps in this section to create a new Microsoft Entra application in your Azure Machine Learning workspace. This resource in the Azure portal holds your algorithms. The Microsoft Entra application is an enterprise application that enables Demand planning to connect to your Azure Machine Learning algorithms. (For more information about how to set up a Microsoft Entra application, see Register an application.)

  1. Sign in to the Azure portal by using an account that has at least Cloud Application Administrator privileges.
  2. Register a new Microsoft Entra application as described in Create a Microsoft Entra application and service principal that can access resources.
  3. Follow the on-screen instructions to complete the wizard. Use the default settings.
  4. In the Certificates & secrets section of the new Microsoft Entra application, create a secret for the application as described in Add a client secret.
  5. Make a note of the application ID and its secret. You'll need these details later.

Assign access for the new Microsoft Entra application to the Azure Machine Learning workspace and Azure Machine Learning workspace storage account

Follow these steps to assign access for the new Microsoft Entra application to the Azure Machine Learning workspace.

  1. In the Azure portal, go to the resource group that contains your Azure Machine Learning workspace.
  2. On the left navigation pane, select Access control.
  3. On the Role assignments tab, select Add to add a new role assignment.
  4. On the Privileged administrator roles tab, select Contributor.
  5. Select Next.
  6. Select the User, group, or service principal option.
  7. Select Select members. Use the filter on the menu on the right to find the name of the Microsoft Entra application that you created, and then select it.
  8. The application now appears in the Members list. Select Next.
  9. On the Review + assign tab, select Next.

Follow these steps to assign access for the new Microsoft Entra application to the storage account that Azure Machine Learning workspace is connected to.

  1. In the Azure portal, go to the resource group that contains your storage account (the storage account that your Azure Machine Learning workspace is using).
  2. On the left navigation pane, select Access control.
  3. On the Role assignments tab, select Add to add a new role assignment.
  4. On the Job function roles tab, select Storage account contributor and Storage blob data contributor. To find these roles quickly, enter storage contributor into the Search field.
  5. Select Next.
  6. Select the User, group, or service principal option.
  7. Select Select members. Use the filter on the menu on the right to find the name of the Microsoft Entra application that you created, and then select it.
  8. The application now appears in the Members list. Select Next.
  9. On the Review + assign tab, select Next.

The application is now listed in the All section of the Role assignments tab on both the Azure Machine Learning workspace and the storage account.

Connect to the Azure Machine Learning service from Demand planning

Follow these steps to set up the Azure Machine Learning service connection in Demand planning.

  1. Sign in to Demand planning.

  2. On the left navigation pane, select Custom Azure ML.

  3. Select the plus sign (+) button to create a new connection, and set the following fields for it:

    • Name – Enter a name for the connection.
    • Subscription ID – Enter the ID for your Azure subscription.
    • Resource group name – Enter the name of the resource group that contains your Azure Machine Learning workspace.
    • Workspace name – Enter the name of your Azure Machine Learning workspace.
    • Storage Account Name – Enter the name of the Azure storage account that you specified when you ran the setup wizard in your Azure workspace.
    • Application ID – Enter the application ID of the Microsoft Entra application that you created. This value is used to authorize API requests to the Azure Machine Learning service.
    • Application secret – Enter the service principal application secret for the Microsoft Entra application that you created. This value is used to acquire the access token for the security principal that you created to perform authorized operations against Azure Storage and the Azure Machine Language workspace.

Set up a forecast that uses your own Azure Machine Learning algorithms

Follow these steps to set up a forecast that uses your own Azure Machine Learning algorithms.

  1. Create a new forecast profile as described in Create and manage forecast profiles.
  2. On the Select a forecasting model preset page, select None.
  3. After you've created and saved the profile, select the Forecast model tab. (For more information, see Design forecast models.)
  4. Set up your model. Include a Finance and operations – Azure Machine Learning tile in the position where you want to run your algorithm.
  5. Complete the model by adding a Save block.