Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
For the payroll integration to work for customers using the mshr entities for Ceredian Dayforce, navigate to API-based payroll integration with Ceridian Dayforce.
Applies to these Dynamics 365 apps:
Human Resources
This article describes the Dynamics 365 Human Resources Payroll integration API. The API enables streamlined end-to-end integrations between Human Resources and partnering payroll systems. The integrated experience begins in Human Resources with the employee profile, salary and deduction, and contribution information. When you hire an employee and enter the required profile and pay information into Human Resources, the payroll system pulls this information to use when processing payroll. Any updates made to the employee or pay information are also pulled for use in later pay runs.
Technical architecture and flow
The following diagram illustrates the technical integration flow from Finance and Operations through Microsoft Dataverse to the external payroll provider:
Data model
The following diagram illustrates relationships within the API. Several types have foreign keys to other, pre-existing entities in Human Resources that aren't illustrated here. This document provides information on entities that are specific to payroll integration scenarios. However, there are many other entities in the Dataverse Web API for Human Resources that might also be relevant to your integration. Some of these entities are referenced in foreign key relationships or navigation properties.
Microsoft Dataverse
This API is built on Microsoft Dataverse using virtual tables. You perform all RESTful interaction with this API through the Microsoft Dataverse Web API (OData), which handles authentication, SLAs, batch processing, concurrency control, and change tracking.
For more information about the Dataverse Web API, see:
- What is Microsoft Dataverse?
- Use the Microsoft Dataverse Web API
- Authenticate to Microsoft Dataverse with the Web API
- Use change tracking to synchronize data with external systems
Enable the integration
To enable and use the Payroll integration API, complete the following four steps in order:
Step 1: Configure the batch job
Step 2: Enable virtual entities
Step 3: Register the Azure AD app
Step 4: Add the app to Dataverse
Step 1: Configure the batch job
Before the virtual entities can synchronize data, schedule the payroll data sync batch job in Dynamics 365 Human Resources. This job prepares and stages payroll data for integration.
For detailed instructions on configuring batch recurrence and selecting entities, see Schedule Payroll Data sync job.
Step 2: Enable virtual entities
The endpoints for the Payroll integration API use the virtual table capabilities of Microsoft Dataverse. By default, the system doesn't deploy the virtual tables and their associated API endpoints for Human Resources environments.
- Ensure the system is configured with the required virtual table solutions and data sources. For more information, see Configure Dataverse virtual tables or Admin reference for virtual entities.
- Sign in to the Power Apps maker portal.
- In the upper-right corner, select the appropriate environment.
- In the left navigation pane, select Tables, and then select All.
- Filter the Table column for Available Finance and Operations Entity.
- Select the table and select Edit on the toolbar.
- Search for the payroll integration entities (prefixed with
PayIntV). Set both Visible and Change tracking to Yes. If an error occurs, select the row and select Edit row using form on the toolbar to update the settings. - Repeat these steps for all required payroll integration entities.
Step 3: Register the Azure AD app
Register an application in Azure Active Directory (Microsoft Entra ID) so that the Microsoft identity platform can provide authentication and authorization services for API calls.
- Open the Azure portal.
- In the Azure services list, select App registrations.
- Select New registration.
- In the Name field, enter a descriptive name for the app (for example, Dynamics 365 Human Resources Virtual Tables).
- Select Register.
- Note the Application (client) ID displayed in the app registration's Overview pane.
- In the left navigation pane, select Certificates and secrets.
- In the Client secrets section, select New client secret.
- Enter a description, choose an expiration duration, and select Add.
- Record the secret's Value.
Important
Record the secret's value immediately. It won't be displayed again after you navigate away from this page.
For more information, see Quickstart: Register an application with the Microsoft identity platform.
Step 4: Add the app to Dataverse
Add the registered application as an application user in Dataverse and link it in Finance and Operations:
- Sign in to the Power Platform admin center.
- In the navigation pane, select Manage > Environments, and select your environment.
- Select Settings > Users + permissions > Application users.
- Select New app user, select Add an app, and select the Application (client) ID registered in Step 3.
- Select the business unit, and assign the Basic User and Finance and operations basic user security roles to the app user.
- In the Finance and Operations application, go to System administration > Setup > Microsoft Entra ID applications.
- Select New, and enter the Client ID and Name of the application.
- In the User ID field, select a user who has permission to read and write the payroll integration entities, and save the record.
When you complete the setup, the OData endpoints are ready for the payroll provider to read and write data. For details on the available entities and their schemas, see Payroll employee and related entities.
Payroll employee and related entities
Entities:
- Payroll employee
- Payroll worker address
- Payroll fixed compensation plan
- Payroll variable compensation enrollment
- Payroll position job
- Payroll position
See also
Configure Human Resources parameters
Configure Human Resources shared parameters
What is Microsoft Dataverse?
Use the Microsoft Dataverse Web API
