How to update the AD attribute CustomAttribute1 and synchronize it with O365

active-directorymicrosoft-office-365

In our company we need to update the CustomAttribute1 attribute some Exchange mailboxes online O365, then if we do it from the tenant or from powershell says it can not be done because the user is synchronized with Active Directory, so it should be done from there.

Set-Mailbox -Identity omar@dominio.com -CustomAttribute1 "Financial"
Could not perform the operation on the mailbox "Omar" because it is outside the scope of
writing the current user. The 'Set-Mailbox', 'CustomAttribute1' action can not be performed in the 'Omar' object because the object is being synchronized from its internal organization. This action should
performed on the object in its internal organization.

But if we go to AD and using powershell: Get-ADUser omar -Properties appears CustomAttribute1 us

Get-ADUser: One or more properties are not valid.
Parameter name: CustomAttribute1
Online: 1 Character: 1
+ Get-ADUser omar -Properties CustomAttribute1

Therefore neither can upgrade from AD because does not exist or is not recognized. We found something that said it used "extensionAttribute1" but did not work. When listing the properties of a user with powershell not appear these CustomAttribute1, 2, 3..15.

So we want to know is what is the attribute or field in AD to be updated so that when synched with Office365, the exchange field appears CustomAttribute1 updated? Or How to be created in the AD if if they do?

Thank you very much.

Best Answer

You're looking for extensionAttribute1:

Set-AdUser -Identity <name> -Replace @{ extensionAttribute1="something" }