Skip to main content

Security Group Sync Service Principal

Administrator

DataCentral can automatically sync the members of an Entra ID Security Group into a DataCentral Organizational Unit (OU). To do this without requiring highly privileged permissions on the logged-in user, you configure a dedicated Security Group Sync Service Principal.

This is the recommended approach for OU sync, as it is more secure than using the Authentication + Power BI + Security Groups permission level — the service principal handles group management independently rather than relying on elevated permissions from the authenticated user.


1. Register an Application in Entra ID​

  1. Log in to the Azure portal.
  2. Navigate to Microsoft Entra ID > App registrations.
  3. Click New registration.
  4. Provide a name (e.g., DataCentral Security Group Sync) and click Register.
  5. Copy the Application (client) ID and Directory (tenant) ID from the Overview tab.
  6. Go to Certificates & secrets, click New client secret, and copy the Value immediately.

2. Configure API Permissions​

  1. In the App Registration, go to API permissions.
  2. Click Add a permission > Microsoft Graph > Application permissions.
  3. Add User.ReadBasic.All.
  4. Click Grant admin consent for your organisation.

3. Grant Group Access​

There are three ways to allow the service principal to manage group membership:

Give the service principal a custom role that can only manage the members of the groups you choose. This requires Microsoft Entra ID P1 or higher.

  1. Create a custom role with these three permissions:
    • microsoft.directory/groups/members/update
    • microsoft.directory/groups/members/read
    • microsoft.directory/groups/standard/read
  2. Create an administrative unit.
  3. Add the security groups you want to sync to the administrative unit.
  4. Assign the custom role to the service principal, scoped to the administrative unit.

To link more groups later, add them to the administrative unit. The service principal needs no other changes.

See Scoped Custom Role for Security Group Sync for a step-by-step tutorial with PowerShell scripts that do all of this for you.

Option B: Add as Group Owner​

Making the service principal an Owner of each security group does not require Entra ID P1. As an owner, it can only read and manage members of the specific groups it owns — it cannot enumerate or access other groups in your directory.

  1. In the Entra admin center, navigate to Groups and open the security group.
  2. Go to Owners and click Add owners.
  3. Search for the service principal by the name of the app registration and add it.

Repeat this for each security group you intend to sync with DataCentral OUs.

Alternatively, you can grant the service principal tenant-wide permissions instead of making it a group owner. This gives it full control over group membership across your entire directory, so it is less restricted but requires no per-group configuration.

Add the following Application permissions in addition to User.ReadBasic.All:

  • Group.Read.All
  • GroupMember.ReadWrite.All

Click Grant admin consent after adding these permissions.

note

With this approach the service principal can read and modify membership of any group in your tenant. Use Option A or Option B if you want to limit its visibility and access to specific groups only.

4. Configure DataCentral​

  1. Navigate to Administration > Settings and open the Azure Configuration tab.
  2. Enter your Entra tenant ID in Azure Tenant ID.
  3. Open the Entra Security Group Sync tab.
  4. Select Security Group Sync Graph Service Principal, then enter the following credentials from your App Registration:
    • Client ID
    • Client Secret
  5. Leave Use Logged-In User's Token as Fallback turned off, so that every change in Entra ID is made by the service principal and stays within the access you granted it.
  6. Click Save all.

The other two options on this tab only affect DataCentral. Activate new users on sync decides whether synced users start active, and Remove users not in security group removes users from the DataCentral OU when they are no longer in the group. Neither changes anything in Entra ID.

Once configured, you can link security groups to Organizational Units from the OU settings. DataCentral will use this service principal to read group membership and sync users into the corresponding OU. See Syncing OUs with Entra ID.

Client secret expiry

The client secret expires on the date you chose when you created it. Create a new secret before then and update it on the Entra Security Group Sync tab, or DataCentral loses access to the groups.