{"id":4639,"date":"2025-09-28T11:26:14","date_gmt":"2025-09-28T11:26:14","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=4639"},"modified":"2025-09-28T11:26:14","modified_gmt":"2025-09-28T11:26:14","slug":"unable-to-remove-proxyaddress-from-non-mail-enabled-non-exchange-online-user-in-microsoft-365","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=4639","title":{"rendered":"Unable to Remove ProxyAddress from Non-Mail Enabled (Non-Exchange Online) User (in Microsoft 365)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We have a user which has somehow added a proxyAddress (an email address to their account) but they don&#8217;t have an Exchange Online mailbox, and seemingly never have. Microsoft says the following about it from this\u00a0<a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/api\/resources\/user?view=graph-rest-1.0#mail-and-proxyaddresses-properties\">article<\/a>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>mail<\/strong>&nbsp;and&nbsp;<strong>proxyAddresses<\/strong>&nbsp;are both email-related properties. The&nbsp;<strong>proxyAddresses<\/strong>&nbsp;property is a collection of addresses only relevant to the Microsoft Exchange server. It&#8217;s used to store a list of mail addresses for a user that are tied to a single mailbox. The&nbsp;<strong>mail<\/strong>&nbsp;property is used as the user&#8217;s email address for various purposes including user sign-in and defines the primary proxy address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both&nbsp;<strong>mail<\/strong>&nbsp;and&nbsp;<strong>proxyAddresses<\/strong>&nbsp;can be retrieved through the&nbsp;<a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/api\/user-get?view=graph-rest-1.0\">GET user<\/a>&nbsp;API. You can update the&nbsp;<strong>mail<\/strong>&nbsp;via the&nbsp;<a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/api\/user-update?view=graph-rest-1.0\">Update user<\/a>&nbsp;API, but can&#8217;t update&nbsp;<strong>proxyAddresses<\/strong>&nbsp;through Microsoft Graph. When a user&#8217;s&nbsp;<strong>mail<\/strong>&nbsp;property is updated, it triggers recalculation of&nbsp;<strong>proxyAddresses<\/strong>&nbsp;and the newly updated mail is set to be the primary proxy address, except in the following scenarios:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>If a user has a license that includes Microsoft Exchange, all their proxy addresses must belong to a verified domain on the tenant. Any that don&#8217;t belong to verified domains are silently removed.<\/li>\n\n\n\n<li>A user&#8217;s mail is NOT set to the primary proxy address if the user is a guest and the primary proxy address contains the guest&#8217;s UPN string with #EXT#.<\/li>\n\n\n\n<li>A user&#8217;s mail is NOT removed, even if they no longer have proxy addresses if the user is a guest.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>proxyAddresses<\/strong>&nbsp;are unique across directory objects (users, groups, and organizational contacts). If a user&#8217;s&nbsp;<strong>mail<\/strong>&nbsp;property conflicts with one of the&nbsp;<strong>proxyAddresses<\/strong>&nbsp;of another object, an attempt to update the&nbsp;<strong>mail<\/strong>&nbsp;fails, and the&nbsp;<strong>proxyAddresses<\/strong>&nbsp;property isn&#8217;t updated either.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">An example of the problem can be seen below, as you can see the object on the right has the <strong>bob@address.com<\/strong> email address but an incoming synching account also has this address. So we need to remove the erroneous entry (email address) from the account on the right, so the synchronisation happens properly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, how can you end up in this situation? Well, there are a few ways, it could be an account that did have a mailbox but it has now been removed and the associated address was not removed, or in this case the user had an administrative account which they edited the profile of to add their on-premise email addresses to so it could receive email, turned out when editing the profile, this gets the email addresses stuck in there.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"453\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-1-1024x453.png\" alt=\"\" class=\"wp-image-4641\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-1-1024x453.png 1024w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-1-300x133.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-1-768x340.png 768w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-1-1536x680.png 1536w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-1.png 1601w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When we look at the object, we see the SMTP address (circled).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"492\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-1024x492.png\" alt=\"\" class=\"wp-image-4640\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-1024x492.png 1024w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-300x144.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-768x369.png 768w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image.png 1304w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"UnabletoRemoveProxyAddressfromNonMailEnabled(NonExchangeOnline)User(inMicrosoft365)-Resolution\">Resolution<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">To resolve the issue, we need to add an Exchange Online licence to the user&#8217;s account, once added, we can then remove the problematic&nbsp;proxyAddress, then we can remove the Exchange Online licence.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Add a Licence to Enable Mailbox Features<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add the licence, Microsoft 365 E3 should do the trick (or whatever you are using in your environment), then click on &#8220;Save Changes&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"477\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-1024x477.png\" alt=\"\" class=\"wp-image-4642\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-1024x477.png 1024w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-300x140.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-768x358.png 768w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-1536x716.png 1536w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2.png 1670w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Remove Problematic Address<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Using PowerShell run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Connect-ExchangeOnline\n\nSet-Mailbox \"Bob Smith\" -EmailAddresses @{remove=\"bob@address.com\"}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Where bob@address.com is the email address you want to remove.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that if the problematic address you are removing is the PrimarySMTPAddress, you need to add something in its place BEFORE you attempt to remove the problematic email address. So, you&#8217;ll need to add something unique.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now run the following command to see that it is gone!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Mailbox \"Bob Smith\" | fl DisplayName,PrimarySMTPAddress,EmailAddresses<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Remove Licence<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, we remove the licence, we added earlier from the user account, then click on &#8220;Save Changes&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"477\" src=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-1024x477.png\" alt=\"\" class=\"wp-image-4642\" srcset=\"https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-1024x477.png 1024w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-300x140.png 300w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-768x358.png 768w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2-1536x716.png 1536w, https:\/\/geekmungus.co.uk\/wp-content\/uploads\/2025\/09\/image-2.png 1670w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The issue should now be resolved, also check to ensure you don&#8217;t have multiple things that are conflicting!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"UnabletoRemoveProxyAddressfromNonMailEnabled(NonExchangeOnline)User(inMicrosoft365)-AdditionalInformation\">Additional Information<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/api\/resources\/user?view=graph-rest-1.0#mail-and-proxyaddresses-properties\">https:\/\/learn.microsoft.com\/en-us\/graph\/api\/resources\/user?view=graph-rest-1.0#mail-and-proxyaddresses-properties<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.reddit.com\/r\/Office365\/comments\/1d4sl34\/unable_to_remove_proxy_address_from_non_exo_user\/\">https:\/\/www.reddit.com\/r\/Office365\/comments\/1d4sl34\/unable_to_remove_proxy_address_from_non_exo_user\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We have a user which has somehow added a proxyAddress (an email address to their account) but they don&#8217;t have an Exchange Online mailbox, and seemingly never have. Microsoft says the following about it from this\u00a0article: An example of the problem can be seen below, as you can see the object on the right has &#8230; <a title=\"Unable to Remove ProxyAddress from Non-Mail Enabled (Non-Exchange Online) User (in Microsoft 365)\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=4639\" aria-label=\"Read more about Unable to Remove ProxyAddress from Non-Mail Enabled (Non-Exchange Online) User (in Microsoft 365)\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":4361,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[],"class_list":["post-4639","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4639"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4639\/revisions"}],"predecessor-version":[{"id":4643,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/4639\/revisions\/4643"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/media\/4361"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}