UnableToWriteToAadException For Mailbox Stored in Cloud but Managed On-Prem

Ryan Broman 21 Reputation points
2022-11-07T23:09:20.657+00:00

Hello,

I'd like to add an email address to a user like so:

Set-Mailbox RBroman -EmailAddresses @{add="TestRBroman@xyz.com"}  

However, when running it while connected to Exchange Online I get the following 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:   

We are a hybrid environment and recently moved our mailboxes to the cloud. So I opened Exchange Management Shell on-prem to try it and received a Not Found Error:

The operation couldn't be performed because object 'rbroman' couldn't be found on ''.  

So if I can't edit mailboxes in the cloud AND I can't edit them on-prem, what do I do?

It should be noted that I am able to edit the mailbox using the on-prem EAC but am trying to automate processes via PowerShell.

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,768 questions
Windows 365 Business
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
6,523 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,417 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 121K Reputation points MVP
    2022-11-07T23:14:56.893+00:00

    on-prem its a remote mailbox

    Set-RemoteMailbox RBroman -EmailAddresses @{add="TestRBroman@xyz.com"}
    

0 additional answers

Sort by: Most helpful