Guest users in M365 do not have 365 mail boxes. Emails to guest users are sent to the external email address provided when the guest user is created.
On creation of a guest user the user object has the following properties:
- Mail = "<user's external email address>"
- ProxyAddresses = "{SMTP:<user's external email address>}"
However, if a guest user is deleted and subsequently restored the ProxyAddress is not re-created properly with the result that emails sent to the guest user are not directed to the correct external email address. To correct this I need to edit the ProxyAddress property but it seems that it is read-only. As a result it is not possible to properly restore a guest user that has been deleted.
It seems that one of the reasons that the ProxyAddress property is read-only is because it is derived from other properties associated with the user object and specifically the Mail property. However, this property cannot be edited in AzureAD and is managed by ExchangeOnline. Unfortunately, however, guest users are not managed by ExchangeOnline as they do not have 365 mail boxes. So it seems like a catch-22 situation for guest users.
Any help or suggestions would be appreciated. As I need to amend the ProxyAddresses property of hundreds of guest users I am only interested in solutions that can be implemented in PowerShell.
Many thanks,
Conor.