question

JeOlso-4938 avatar image
0 Votes"
JeOlso-4938 asked JeOlso-4938 answered

Error with Set-Mailbox -identity -WindowsEmailAddress

Our organization will sometimes have the default return address on someone’s mailbox get set incorrectly (@onmicrosoft...). From a powershell properties standpoint this is governed by the WindowEmailAddress property, which is not accessible to set from our Active Directory and must be set via powershell. We use Exchange Online.

The only way to fix this is to run a set-mailbox command and set the WindowsEmailAddress property. Here’s the command:
Set-Mailbox -identity user@domain.org -WindowsEmailAddress user@domain.org

This has always worked for us, but is currently failing and returning this error:

An Azure Active Directory call was made to keep object in sync between Azure Active Directory and Exchange Online.
However, it failed. Detailed error message:
Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently
undergoing migration. DualWrite (Graph) RequestId: 601cbb66-6ecb-4d0e-a49a-e4c1b34f638f
The issue may be transient and please retry a couple of minutes later. If issue persists, please see exception members
for more information.
+ CategoryInfo : NotSpecified: (:) [Set-Mailbox], UnableToWriteToAadException
+ FullyQualifiedErrorId : [Server=(redacted),RequestId=9089622f-171a-4e64-940e-16a03d377d61,TimeStamp=4/11/2022 5:44:57 PM] [FailureCategory=Cmdlet-UnableToWriteToAadException] 32AC7017,Microsoft.Exchange.Management.Recipient
Tasks.SetMailbox
+ PSComputerName : outlook.office365.com


Troubleshooting done:
-I have tested this set-mailbox command against other accounts and they give the same error.
-I have tested other Set-Mailbox commands in this environment and they work successfully.
-I logged in to our AAD sync server and it is indicating success in sync cycles.
-We are not migrating any accounts in Azure
-I logged in to Azure Active Directory admin console to see if I may edit the address there and I cannot

windows-server-powershelloffice-exchange-online-itpro
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JeOlso-4938

I agree with the suggestion below from michev, it's better to manage the attribute from on-prem side.

Or you may refer to the article here introduced about this similar issue:

Exchange Online Improvements to Accelerate Replication of Changes to Azure Active Directory
200161-image.png

And the introduction about the parameter: -WindowsEmailAddress
The WindowsEmailAddress property is visible for the recipient in Active Directory Users and Computers in the E-mail attribute. The attribute common name is E-mail-Addresses, and the Ldap-Display-Name is mail. If you modify this attribute in Active Directory, the recipient's primary email address is not updated to the same value.

0 Votes 0 ·
image.png (49.7 KiB)

Hi,

I am writing to see how everything is going on with this thread. If you still have further concern on this, please feel free to let us know.


If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



0 Votes 0 ·
michev avatar image
0 Votes"
michev answered michev commented

For the record, this has never been a supported scenario, just a workaround. Changes need to be made on-premises, if you want them to persist.
In any case, this was certainly a useful workaround, and it will be a bummer if Microsoft decided to can it. I'll try to repro with my test tenants.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sorry for the delay here. I'm able to reproduce the issue, so it looks like the workaround is no longer viable, when it comes to synced users. You can still use the -WindowsEmailAddress against cloud-provisioned mailboxes, not that it helps you.

0 Votes 0 ·
JeOlso-4938 avatar image
0 Votes"
JeOlso-4938 answered

Apologies for not updating sooner - unfortunately the answer that it doesn't work anymore seems to be the actual answer.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.