We have an Exchange Online server and the suggesting hybrid environment to synchronize our AD structure with the O365 accounts - so far, so good.

When I´m creating a new user, I´ll do it on the local exchange, so that both our AD and O365 environment get knowledge of this new user - works excellent!

A few weeks ago, our co-admin created two new users in our AD and in the O365 portal - miraculously this works too, but our local exchange is not aware of this accounts.

So is there a way or script to sync the O365 account to our local exchange?

Solution 1 (not the best one): delete the user + mailbox and recreating it. Problem: it got already a few hundred mails, group memberships and so on.

I really appreciate the help!


To solve the problem you need to run SMTP matching. This means that you need to create a local AD object with SMTP address that matches primary SMTP address of a user object in Office 365. Details see: A user has an Office 365 account and no local AD account;

To match users in Office 365 with AD users, follow the steps below:

1.Log in to Office 365 and go to Exchange admin center.

2.Write down the primary SMTP address for a selected user in Exchange Online (if you do not have an Exchange Online license, you can take this address from user’s Office 365 login – in most cases it’s the same). 3.Create a user object in your local Active Directory with the same attributes (first name, last name, UPN, etc.) as they are in Office 365.

4.Set up the primary SMTP address for a new AD object using the address from step 2. In Active Directory, look for the proxyAddresses attribute.Setting up proxyAddresses parameter

5.Force the synchronization of AD objects with Office 365 on the server with Azure AD Connect. Use the following cmdlet:

Start-ADSyncSyncCycle -PolicyType Delta

6.After a successful user synchronization, you should see that the Sync type section shows Synced with Active Directory instead of In cloud.

| improve this answer | |
  • Thank you for your help - I´ve managed to do it with your instructions, very nice! Thanks a lot! – Anton Kruk Nov 19 '18 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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