Search code examples
c#exchangewebservicesmicrosoft-exchange

Setting user's SimpleDisplayName via EWS


I'm trying to update Simple Display Name property of a user using Exchange EWS Managed APIs, but I'm not sure either about which is the correct object/class to interact to update users' attributes.

What I have tried is retrieving all UserSettingsName, with same code used and available in this example Exchange 2013: Get user settings with Autodiscover, but the key/value I'm looking for isn't there.

Using PowerShell Get-User and Set-User cmdlets the value can be correctly read and set, as explained in this article Using the SimpleDisplayName attribute for Exchange and Exchange Online in Office 365 with PowerShell

$user = Get-User [email protected] Set-User $user.Identity -SimpleDisplayName "My Display Name"

But I would like to be able to read/write the value of this property via EWS


Solution

  • You can't set or get that property via EWS as its not meant to be user set-able property (eg only admins should be able to change this and that must be done via the Admin interface eg EMS or EAC).