Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hi Caleb,
Thanks for contacting us,
I understand that you are trying to automate the Office 365 cloud account creation for your organization and you want to make the proxyAddresses in Exchange different from the UPN in Azure. I searched for some possible solutions and found the following information:
- According to https://learn.microsoft.com/en-us/powershell/module/exchange/set-mailbox?view=exchange-ps, the Set-Mailbox cmdlet can be used to modify the email addresses of existing mailboxes in Exchange Online. The -EmailAddresses parameter accepts a list of email addresses that you want to assign to the mailbox. You can use the SMTP prefix to indicate the primary email address, and the smtp prefix to indicate the secondary email addresses. For example, you can use the following command to set *************** as the primary email address and ******************** as a secondary email address:
Set-Mailbox -Identity *************** -EmailAddresses SMTP:***************,smtp:********************
- However, if you want to set the primary email address to a different value than the UPN, you need to disable the email address policy for the mailbox first. The email address policy automatically generates email addresses for mailboxes based on their UPN and other attributes. To disable the email address policy for a mailbox, you can use the -EmailAddressPolicyEnabled parameter with a value of $false. For example, you can use the following command to disable the email address policy for ***************:
Set-Mailbox -Identity *************** -EmailAddressPolicyEnabled $false
- After disabling the email address policy, you can then use the -EmailAddresses parameter to set the primary email address to a different value than the UPN. For example, you can use the following command to set ********************* as the primary email address for ***************:
Set-Mailbox -Identity *************** -EmailAddresses SMTP:*********************,smtp:***************
- Note that disabling the email address policy will prevent any future changes to the UPN or other attributes from affecting the email addresses of the mailbox. If you want to re-enable the email address policy later, you can use the -EmailAddressPolicyEnabled parameter with a value of $true. For example, you can use the following command to re-enable the email address policy for ***************:
Set-Mailbox -Identity *************** -EmailAddressPolicyEnabled $true
I hope this helps!
Regards, Sola