Integrating the system with Microsoft Entra ID ​

Integrating RCPonline with Microsoft Entra ID (previously Azure Active Directory) enables automatic working time registration by synchronizing login activity. In this article you’ll find a detailed description of how it works, how to configure it, and error scenarios.


1. How it works ​

The goal of the integration is to synchronize user login data from Microsoft Entra, which allows automatic completion of events in the RCP system. The process includes user authorization, fetching login data, and synchronizing it with accounts in the RCPonline system.


2. RCP system functionalities ​

2.1. Authorization process ​

To start the authorization process:

  1. Go to:
    Configuration → Import → Events → Import events from Microsoft Entra ID.
  2. Enable synchronization with Microsoft Entra ID.

Authorization steps:

  1. User sign-in:
    • The user is redirected to the Microsoft Entra sign-in screen.
    • A device code and a user code are generated, which the user enters in the Entra system.
    • The RCP system receives an access token and a refresh token, which are stored in the user session.
  2. User verification:
    • The RCP system identifies the user based on the email address obtained from Microsoft Entra ID.
    • If the user exists in the RCP database, they are signed in. Otherwise, a message is displayed indicating that the user does not exist in the system.

Request URLs:

  • Get device code:
    https://login.microsoftonline.com/{authTenant}/oauth2/v2.0/devicecode
  • Get user token:
    https://login.microsoftonline.com/{authTenant}/oauth2/v2.0/token
  • Fetch user data from Microsoft Graph:
    /me?$select=displayName,mail,userPrincipalName
  • Fetch sign-in logs:
    /auditLogs/signIns?$filter=createdDateTime ge {startDateTime} and createdDateTime le {endDateTime} and userPrincipalName eq '{userEmail}'

2.2. Sign-in synchronization ​

To synchronize user sign-in data:

  1. Go to:
    Configuration → Import → Events → Import events from Microsoft Entra ID.
  2. Click Synchronize events.

Synchronization behavior:

  • The system fetches sign-in data for employees with the setting enabled:
    “Enable employee synchronization with the Microsoft Entra ID system”.
    This setting is located under:
    Employees → Employee list → Edit → Registration permission.
  • Data is fetched for each user for the last month based on the email address.
  • Events that already exist in the system are skipped during import.

3. Access requirements and permissions ​

3.1. Required permissions in Microsoft Entra ​

  • SignIn Logs:
    • The RCPonline application must have permissions to read sign-in logs (Audit Logs).

3.2. Application settings in Microsoft Entra ​

  • A Microsoft Entra administrator must grant the required permissions to the RCP application under:
    Enterprise applications.

4. Error scenarios ​

4.1. No access to logs feature ​

Cause: Missing a Microsoft Entra subscription that includes SignIn Logs.
Solution: Make sure the subscription includes access to event logs.

4.2. Missing required roles ​

Cause: Missing required user roles (e.g., Global Administrator).
Solution: Assign the appropriate administrative roles to the user in Microsoft Entra.

4.3. Missing app permissions ​

Cause: The RCP app in Microsoft Entra does not have the required permissions.
Solution: Configure the app permissions in the Microsoft Entra panel.

4.4. Other errors ​

Cause: An unknown error on the integration side.
Solution: Contact our support team for assistance.


Summary ​

Integrating the RCPonline system with Microsoft Entra ID automates the event registration process, increasing the efficiency of working time management in your company. Correct configuration of permissions and synchronization is key for the integration to work properly.