4

Is it possible to sync users from cloud Azure Active Directory to on premise AD? On premise is a bit wrong here because it is actually a virtual network in Azure with a Windows Server virtual machine AD. I started with Azure AD and therefore all users are there but I would like to sync them to this virtual machine AD in a virtual network in Azure. I tried Azure AD Connect but this works to sync form on premise to Azure AD. How can I do it the other way around?

2 Answers 2

4

Is it possible to sync users from cloud Azure Active Directory to on premise AD?

For now, it is not possible.

Here the feedback about it, maybe you can vote up it, that feedback will be monitored and reviewed by the Microsoft engineering teams.

As a workaround, we can use powershell to export Azure AD users' information to local file, then use that file to create users in on premise AD.

Here a similar case about you, please refer to it.

Hope this helps.

1
  • Please let me know if you need more help:)
    – Jason Ye
    Mar 23, 2018 at 6:02
0

I have written a custom algorithm to do the process and it works for me so far so well. I would state the approach that I have followed. This process will get executed after user logs in through Single Sign On.

Step-by-step process to be followed once the user is validated with AD.

  • Fetch User Manager Chain for the user with Indian Region Filter through Graph API

    https://graph.microsoft.com/v1.0/users/${usermail}?$expand=manager($levels=max;

  • Convert User Chain Nested Objects to Array of Users

  • Loop user array in reverse

  • For every traversal, check if the user present (match with Object ID)

    If User Present in Database,

    a. Compare user data with OIDC :id: 
    
    b. On Variance, call update() to keep data in sync with AD information
    

    User not Present in DB,

    a. Call insert() to insert the user data to the database
    

Note: I am calling this process every time a user logs in and it is able to insert any new users or update the data in the database if it doesn't match with AAD. This would be an efficient approach if the management chain is around 10. I couldn't find a way to do this thing anywhere else so came up with this process.

1
  • This might not flex for everyones needs. But just thought of putting it here so it could help someone :)
    – Abinash
    Dec 28, 2021 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.