Wow… didn’t expect this. I implemented Dirsync in our environment and it has changed the primary SMTP address for all users to user@domain.onmicrosoft.com. Trying to switch it back in the Office Exchange admin portal gives me an error that says I have to do this in my local AD.

When looking at the user objects I see no record of the onmicrosoft.com portion of the domain. I checked User Attributes and reviewed the proxyaddress setting and the mail setting and they both show the original @domain.com address like it should.

I edited the listing to include SMTP: in front of the address hoping this will update Office to use that as the primary SMTP address - is this going to work and I just have to be patient and wait for our AD to sync w/Office or is there another fix I need to do?

4 Spice ups

I’m thinking the SMTP: should do it. Just reviewed this article, relevant information is:

“Note The primary SMTP address value for the user object should be prepended by an uppercase “SMTP:” designator for the address value to be formatted correctly for the proxyAddresses attribute. For example, “SMTP:username@contoso.com” is an acceptable value, and “username@contoso.com” isn’t an acceptable value.”

It’s been a while since I managed Office365 but I think you just have to set the email property on the General tab to the address you want. You go to proxyaddresses when you want to add email aliases, SMTP = primary address smtp: alias

1 Spice up

Updated all users to include SMTP: in the proxyaddresses attribute and forced a dirsync via powershell - am waiting for it to complete and will see how I come out.

Correcting the proxyaddresses attribute to include SMTP: did resolve the domain issue, but then I ran into something else. In case it’s of any help to anyone that might come across this thread in the future here’s the incident report I wrote up on the issue:

Issue resolved. The root cause was two main items:

  • Issue #1: An attribute in Active Directory (proxyaddresses) was set incorrectly for synchronization with Microsoft Windows Azure Active Directory so the primary SMTP address fell back to principlesolutionsgroup.onmicrosoft.com

  • Issue #2: After correcting the attribute I found that synchronization was not occurring and the Synchronization Service Manager showed that errors were present in the Azure Active Directory connector (stopped-extension-dll-exception). My local Active Directory Connector showed ‘success’ because the local administrator account was authentication correctly, but the Azure Connector showed the error. The cause of the failure was that when I initially configured the authoritative Office 365 administrator account for authentication (my account) I used the password for my O365 login. This resulted in an initial successful replication. However, once replication had occurred, my password updated to my domain.com AD password effectively breaking future authentication. The fix was to update the credentials to use my now replicated local domain AD password.

  • Synchronization immediately resumed successful replication and the issue is now resolved.

  • Note: The default replication time was three hours. I reconfigured the connector to replicate every 30 minutes to speed up replication of any future changes.

Hope this might help someone in the future!

Thanks!

i had a conference call with Microsoft support for 2 hours and finally we made it, we wrote a specific code to change Primary SMTP for all of AD users , Enjoy!!!

1- Go to Windows Power-Shell and run this code


Active Directory SMTP SYNC ALL USERS

Import-Module ActiveDirectory

$users = Get-ADUser -Filter *

foreach ($user in $users)

{

$email = $user.samaccountname + ‘@domainName.com

$newemail = “SMTP:”+$email

Set-ADUser $user -Add @{proxyAddresses = ($newemail)}

}

------------------------------------------------------------------------------------------------------

2- Re-sync your AD with OFFICE 365 ( use Directory Sync Configuration Tools )

3- wait 5 to 10 minutes and its Done!!

Sincerely

Milad Mousavi

Do you just change the domain name in this script and then run it from the ADFS server?

Yes, correct you have to change the domain name and run the script

what will it do to the primary SMTP which is already existing?

does it convert it automatically to secondary or you need to run the script to change it to smtp:email@olddomain.com