How to remove alias in a user

Calvin Lim Kok Meng 20 Reputation points
2025-08-04T07:12:17.05+00:00

I encounter this error when I try to remove the alias information from the contact list. FYI, I rename this user to another person when the original user resigned. It taken more than 3 days and still it is not updated.

Error:

Can't set Microsoft.Exchange.Data.Directory.Management.Mailbox with value with either direct assignment or parse: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Exchange.Data.DataValidationException: Alias: The property Alias can't be empty. at Microsoft.Exchange.Data.SubstrateBasePropertyBag.set_Item(PropertyDefinition propertyDefinition, Object value) at Microsoft.Exchange.Data.Directory.ADPropertyBag.set_Item(PropertyDefinition key, Object value) at Microsoft.Exchange.Data.ConfigurableObject.set_Item(PropertyDefinition propertyDefinition, Object value) at InvokeStub_MailEnabledRecipient.set_Alias(Object, Span1) at System.Reflection.MethodBaseInvoker.InvokePropertySetter(Object obj, BindingFlags invokeAttr, Binder binder, Object parameter, CultureInfo culture) --- End of inner exception stack trace --- at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider1.SetParameterValue(PropertyInfo property, Object obj, Object value) System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Exchange.AdminApi.PSDirectInvokeProvider.PSDirectInvokeProvider`1.SetParameterValue(PropertyInfo property, Object obj, Object value).

Contact List Error

As you can see the user name is SR... and the alias is ma... we wanted to remove this alias but will encounter error message above.

Exchange Online
Exchange Online
A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Kudos-Ng 10,800 Reputation points Microsoft External Staff Moderator
    2025-08-04T09:10:38.9366667+00:00

    Hi Calvin Lim Kok Meng

    Thank you for posting your question in the Microsoft Q&A forum. 

    Based on your description, it seems you're encountering an error when attempting to remove the alias from a contact list entry, specifically after renaming a user following their resignation. The error message indicates that the Alias property cannot be empty, which aligns with the behavior I’ve observed during testing. 

    To validate this, I attempted to edit the contact information of a user mailbox in Exchange Online and left the alias field blank to simulate removal. The result was the same error you encountered, confirming that the system does not allow the alias property to be empty. 

    undefined

    After researching further, I found relevant information in the official documentation: ExchangeUser.Alias property (Outlook) | Microsoft Learn. The documentation states: 

    “This property corresponds to MAPI property PidTagAccount. Returns an empty string if this property has not been implemented or does not exist for the ExchangeUser object.” 

    This implies that by design, the alias field cannot be removed or left blank. When a new user is created in Microsoft 365, the alias is automatically generated based on the prefix of the UserPrincipalName (UPN). Therefore, the alias is a required property and must contain a value. 

    If your goal is to update the alias to reflect the new user’s identity, I recommend assigning a new alias rather than attempting to remove it entirely. 

    I hope the information I’ve provided is helpful to you. If you have any further questions, feel free to reach out! 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment"

    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 comments No comments

1 additional answer

Sort by: Most helpful
  1. Emmanuel Santana 34,045 Reputation points Independent Advisor
    2025-08-04T07:53:05.9766667+00:00

    Hello. When you renamed the user, did you assign a new alias/primary SMTP or leave the Alias field blank in Exchange Admin Center or PowerShell?

    Also, are you performing the alias removal in Microsoft 365 cloud-only or is this mailbox synced from on-prem AD via Azure AD Connect?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.