Trends

MH504 – Securing D365FO MHAX Integration: Utilizing Entra ID and Key Vault Managed Identity for OAuth 2.0 Authentication

Introduction

In today’s digital landscape, securing integrations is paramount to protect sensitive data and ensure seamless operations. This article explores how to enhance the security of D365FO MHAX integration by leveraging Entra ID for OAuth 2.0 authentication and utilizing Key Vault managed identity. While I won’t delve into the step-by-step setup process of key vault managed identity, I’ll highlight the key benefits and considerations of this approach, providing you with a comprehensive understanding of how these technologies can fortify integration’s security.


Register a New Application in Azure AD (Entra ID)

  1. Sign in to the Azure Portal:
    • Go to the Azure Portal and sign in with an account that has permissions to register applications.
  2. Navigate to Azure AD (Entra ID):
    • In the left-hand menu, select Azure Active Directory.
  3. Register a New Application:
    • Under Manage, click App registrations.
    • Click New registration.
  4. Configure the Application Registration:
    • Name: Enter a name for the application (e.g., “MHAX_UAT”).
    • Supported account types: Select Accounts in this organizational directory only (single tenant).
    • Redirect URI: Under Redirect URI (optional), select Single-page application (SPA) and enter the redirect URI that points to your Dynamics 365 environment (e.g., https://<your-dynamics-url>/).
  5. Click Register to create the application.
image-43 MH504 - Securing D365FO MHAX Integration: Utilizing Entra ID and Key Vault Managed Identity for OAuth 2.0 Authentication

Create New client Secret

  1. Create new client secret
    • Under Manage, select Certificates & secrets.
    • Click +New Client Secret
    • Provide appropriate name and set expiry date as per business policy.
image-44 MH504 - Securing D365FO MHAX Integration: Utilizing Entra ID and Key Vault Managed Identity for OAuth 2.0 Authentication

Configure API Permissions

  1. Add API Permissions:
    • Under the Azure AD application, select API permissions.
    • Click Add a permission.
  2. Microsoft Graph API Permissions:
    • Choose Microsoft Graph.
    • Click Delegated permissions
    • Search for User and select All the permissions
image-45 MH504 - Securing D365FO MHAX Integration: Utilizing Entra ID and Key Vault Managed Identity for OAuth 2.0 Authentication
  1. Dynamics ERP Permissions:
    • Choose Microsoft ERP.
    • Click Delegated permissions
    • select All the permissions
image-46 MH504 - Securing D365FO MHAX Integration: Utilizing Entra ID and Key Vault Managed Identity for OAuth 2.0 Authentication
  1. Grant Admin Consent:
    • After adding permissions, click Grant admin consent for <Your Organization> to ensure the permissions are applied.
image-47 MH504 - Securing D365FO MHAX Integration: Utilizing Entra ID and Key Vault Managed Identity for OAuth 2.0 Authentication

Configure Authentication in Dynamics 365

  1. Get the Client ID:
    • Go back to your Azure AD application registration.
    • Under Overview, copy the Application (client) ID.
image-48 MH504 - Securing D365FO MHAX Integration: Utilizing Entra ID and Key Vault Managed Identity for OAuth 2.0 Authentication
  1. Configure Dynamics 365:
    • Sign in to your Dynamics 365 environment.
    • Navigate to Advanced SettingsSettingsSecurityAzure Active Directory Applications (new name – EntraID application).
    • Click + New to register a new Azure AD application.
    • Enter the Application ID you copied from Azure AD and configure any other necessary settings.
image-49 MH504 - Securing D365FO MHAX Integration: Utilizing Entra ID and Key Vault Managed Identity for OAuth 2.0 Authentication

Securing Client Secrets with Azure Key Vault

High-Level Steps:

  1. Create an Azure Key Vault:
    • Set up a new Key Vault in Azure to securely store your secrets.
  2. Store the Entra ID Client Secret:
    • Safely store your Entra ID client secret within the Key Vault.
  3. Assign Permissions to Logic Apps:
    • Grant the necessary permissions to your Logic Apps, allowing them to access the stored secret in the Key Vault.
  4. Integrate Key Vault with Logic Apps:
    • Configure your Logic Apps to retrieve and use the secret directly from the Key Vault during runtime.

Expand Your Knowledge: See More Material Handling Blogs

Share this content:

I am Yogeshkumar Patel, a Microsoft Certified Solution Architect and ERP Systems Manager with expertise in Dynamics 365 Finance & Supply Chain, Power Platform, AI, and Azure solutions. With over six years of experience, I have successfully led enterprise-level ERP implementations, AI-driven automation projects, and cloud migrations to optimise business operations. Holding a Master’s degree from the University of Bedfordshire, I specialise in integrating AI with business processes, streamlining supply chains, and enhancing decision-making with Power BI and automation workflows. Passionate about knowledge sharing and innovation, I created AI-Powered365 to provide practical insights and solutions for businesses and professionals navigating digital transformation. 📩 Let’s Connect: LinkedIn | Email 🚀

Post Comment

Table of Content