Microsoft Entra ID

Scenario - Using directory extensions with group provisioning to Active Directory

In brief

This topic describes how to extend the schema of a group with a new attribute. Then use the new attribute to filter groups for provisioning to Active Directory.

What Entra admins need to know

Review the documentation change to determine whether it affects tenant configuration, security posture, or rollout plans.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

Open on Microsoft Learn ↗

The comparison below is an extract of the Microsoft Learn article showing only the changed content. Open the full article for complete context.

For a better experience executing Microsoft Graph PowerShell SDK cmdlets, use Visual Studio Code with ms-vscode.powershell extension in ISE Mode.

Create two groups in Microsoft Entra ID

To begin, create two groups in Microsoft Entra ID. One group is Sales and the Other is Marketing.

To create two groups, follow these steps.

  1. Sign in to the Microsoft Entra admin center as at least a Hybrid Identity Administrator.
  2. Browse to Entra ID > Groups > All groups.
  3. At the top, clickselect New group.
  4. Make sure the Group type is set to security.
  5. For the Group Name enter Sales
  6. For Membership type keep it at assigned.
  7. ClickSelect Create.
  8. Repeat this process using Marketing as the Group Name.

Add users to the newly created groups

  1. Sign in to the Microsoft Entra admin center as at least a Hybrid Identity Administrator.
  2. Browse to Entra ID > Groups > All groups.
  3. At the top, in the search box, enter Sales.
  4. Click onSelect the new Sales group.
  5. On the left, clickselect Members.
  6. At the top, clickselect Add members.
  7. At the top, in the search box, enter Britta Simon.
  8. Put a check next to Britta Simon and Anna Ringdahl and clickselect Select.
  9. It should successfully add her to the group.
  10. On the far left, clickselect All groups and repeat this process using the Marketing group and adding Lola Jacobson and John Smith to that group.

Create our CloudSyncCustomExtensionApp application and service principal

  1. Get the Tenant ID:

:::image type="content" source="media/how-to-configure-entra-to-active-directory/entra-to-ad-1.png" alt-text="Screenshot of configuration selection." lightbox="media/how-to-configure-entra-to-active-directory/entra-to-ad-1.png":::

  1. On the configuration screen, select your domain and whether to enable password hash sync. ClickSelect Create.

:::image type="content" source="media/how-to-configure/new-ux-configure-2.png" alt-text="Screenshot of a new configuration." lightbox="media/how-to-configure/new-ux-configure-2.png":::

  1. The Get started screen opens. From here, you can continue configuring cloud sync

  2. On the left, clickselect Scoping filters, then select Group scope -> All groups.

  3. ClickSelect Edit attribute mapping and change the Target Container to OU=Groups,DC=Contoso,DC=com. ClickSelect Save.

  4. ClickSelect Add Attribute scoping filter.

  5. Type a name for the scoping filter: Filter groups with Writeback Enabled

:::image type="content" source="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-4.png" alt-text="Screenshot of available attributes." lightbox="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-4.png":::

  1. Under Operator select IS TRUE.
  2. Select Save, and then select Save.
  3. Leave the configuration disabled and come back to it.

Add new extension property to one of our groups

You need to make sure that you have consented to Group.ReadWrite.All. You can do this by selecting Modify permissions.

  1. Navigate to Microsoft Graph Explorer

  2. Sign-Sign in using your tenant administrator account. This may need to be a Hybrid Identity Administrator account. A Hybrid Identity Administrator account was used in creatingto create this scenario. A Hybrid Identity Administrator account mayscenario and might be sufficient.

  3. At the top, change the GET to PATCH

  4. In the address box enter: https://graph.microsoft.com/v1.0/groups/<Group Id>

  5. In the Request body enter:

    {
      "extension_<guid>_WritebackEnabled:_WritebackEnabled": true
    }
    
  6. ClickSelect Run query. :::image type="content" source="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-1.png" alt-text="Screenshot of running the graph query." lightbox="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-1.png":::

  7. If done correctly, you see [].

  8. Now at the top, change PATCH to GET and look at the properties of the marketing group.

  9. ClickSelect Run query. You should see the newly created attribute. :::image type="content" source="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-2.png" alt-text="Screenshot of group properties." lightbox="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-2.png":::

  10. On the left, select Provision on demand.

  11. Enter Marketing in the Selected group box

  12. From the Selected users section, select some users to test. Select Lola Jacobson and John Smith.

  13. ClickSelect Provision. It should successfully provision. :::image type="content" source="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-5.png" alt-text="Screenshot of successful provision." lightbox="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-5.png":::

  14. Now try with the Sales group and add Britta Simon and Anna Ringdahl. This shouldn't provision. :::image type="content" source="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-6.png" alt-text="Screenshot of provisioning being blocked." lightbox="media/tutorial-directory-extension-group-provision/directory-extension-group-provision-6.png":::