Automatically assign a Person to Users in D365 HR

If you work with Microsoft Dynamics 365 Human Resources, you know that you can assign a Person to a User within the system. For instance, a new marketing employee will be assigned to a Marketing Manager. If you work in a big organization that hires a lot of people on a monthly basis, you know that it takes a lot of time to assign all these new employees. You might want to consider using an automatic way to do this to save time. In this article, we show you how to setup an automatic process to make this possible.

How to setup the process

The steps look like this:

Assign Person to User in D365 HR

Step 1: Get the data from the odata URI of workers as shown below with all the authentication with the Active Directory OAuth.

Assign Person to user d365hr

Step 2: Parse the Json data with the body value from Http and type to modify it to Array.

D365 HR automatic roles

Step 3: Create a ‘for each’ loop. In addition to this, apply the body of the output from previous steps and create a compose action to get the details of fields.

Assign person to user in d365 human resources

Step 4: Post the data through the http connector to Person Users entity with the required fields and schedule it on a weekly or on a monthly basis to automate the update without manual intervention.

D365 HR assign user

Step 5: If done correctly, all should be setup now. Lets test it.

We will run the Power Automate flow to map the user Alicia and April with the workers

Test run of atomization of d365 roles

Below is the output.

Test example automation D365 roles

As you can see, the ‘Person’ fields are now filled in.

About FourVision

FourVision aims to improve the life of workforces around the world by structuring, streamlining and relieving HR departments. We do this with Microsoft Dynamics 365 Human Resources and the addition of our own Web Apps that enhance Dynamics 365 Human Resources. Feel free to reach out to us by chat if you have any questions. You can start a chat by clicking the icon on the bottom right of your screen.

At last, I want to give credit to Rajashekar Regati, Technical Consultant at FourVision. He worked on this project and inspired me to write this article.


Table of Contents

Any questions or want more information? Let's talk!