D365 HR | Chapter 37: Cooking with Virtual entities.
Actualizado: hace 5 días
Ok, great. In the past article, I showed you how to turn on integration with CDS Dataverse from D365 HR, but now I want to complete the entire process and show you how to enable virtual entities tables in your environment. Follow the steps, they are a LOT, I know. But is worthy, believe me - I know you do 😜.
👓 First thing to do: Enable the Feature: Virtual Entity support in HR/CDS. Go here EN D365 HR | Chapter 36: DataVerse tables and Integration. (anainesurrutia.com) to complete the steps. Once you've done it, you are ready for the following level.
✍️ Second thing to do: Register the D365HR Instance in Microsoft Azure. How? See steps below;
Go here: Home - Microsoft Azure and log in.
Once you are logged, go to App registrations. And select New registration.
3. You will see that a new page appears, with the following fields:
In this step, you will need to complete, name, and redirect URL - the URL of your D365 HR Instance - then select Register.
Microsoft recommends keeping the name simple, I totally agree with that. I used D365 HR Virtual Entities as the name.
4. Once you've done all of this, the Azure Portal will show you the registration information. Please save Application (client) ID, you will need it later on.
5. In the menu on the left side, select Certificates and secrets, as shown below. Select New client secret, a tab will pop up. Complete the fields and select Add.
🚨 WARNING 🚨: Take note of the secret's value. You'll never see it again, and you will need it in order to complete other processes (I know, a lot of steps, is totally worth it, I promise).
🔌 Third thing to do: Install D365 HR Virtual Entity App.
Go here Power Platform admin center.
You might have a few environments, select the one associated with D365HR. Go to Resources, and select Dynamics 365 Apps.
From the list - see image below - select Dynamics 365 HR Virtual Entity, and select Install.
A new tab will open, you will need to select your environment once again, agree on terms of service and, select Install (again). It can take a few minutes.
💾 Fourth thing to do: Configure the virtual entities tables data source.
Go to Power Platform admin center.
Select the environment associated with D365 HR. Select the URL from this instance.
Solution Health Hub will open - see image below - select Advanced Find (filter icon)
4. You will need to look for Finance and Operations Virtual Data Source Configurations, and after select Results. Select the Microsoft HR Data Source record and complete the fields with the information required.
Target URL: The URL of your D365 HR Instance. I made a horrible mistake here pasting the entire URL for the tenant. Make sure it looks something like this:
Tenant ID: Azure AD tenant ID
AAD Application ID: the one we create in the second phase of this process (D365 HR Virtual Entities, for example).
AAD Application Secret: client secret.
5. Save and Close.
🏆 Fifth phase: Grant app permission in HR. (We are closer, promise!).
Go to D365 HR > System Administration > Links > Setup > Azure Active Directory applications.
2. You will need to create 2 application records, the first with your information and the second with information provided by Microsoft.
First app record:
Client ID: the one you registered in Microsoft Azure Portal.
Name: the one you registered in Microsoft Azure Portal.
User ID: from the dropdown select the user ID with admin permissions (D365 HR and Power Apps environment).
Second app record:
Client ID: f9be0c49-aa22-4ec6-911a-c5da515226ff
Name: Dynamics 365 HR Virtual Entity
User ID: from the dropdown select the user ID with admin permissions (D365 HR and Power Apps environment)
💥 Sixth phase: Generate virtual entities.
In D365 HR, go to System Administration > Links > Integrations > Common Data Service Dataverse configuration
Once you are on the CDS Dataverse config page, go to the Virtual entities tab.
Select the entities you want to generate and click Generate:
As a result, you will see the following box with the number of virtual entities generated:
Till here the process is done.
If OCD hits you in the face and you need to MAKE SURE everything is perfectly working, of course, Microsoft has an amazing way to help you with that.
Step 1: In the search pane look for Process automations.
Step 2. Background processes tab and select Virtual entity poll async operation background process and View most recent results.
I wish you the best of luck with this amazing feature and feel free to reach if you have any issues!