Need to be able to set the Azure AD proxyaddress through an API. Is this available?

Viewed 56

We want users to be able to set their own proxyaddress (alias) email. Is there an API or third party took that will allow this self service?

If not, we can do with the Azure AD Powershell?

I looked at the MSGraph but did not see that this could be set, is that correct?

I don't have experience setting this, but if there are no tools to do it or its not available on an existing API and we can set it some other way, I was thinking of making a logic app api to manage it.

What do you guys think?

1 Answers

I tried to reproduce the same in my environment and got the below results:

Please note that, to set the Email Alias to any user, the user must have assigned licenses (Office 365 E5/F3).

If the user doesn't have required licenses, then the Email Alias won't be available for that user:

enter image description here

To set Proxy address (alias) email to user, one must have Admin permissions to perform the action.

Execute the PowerShell commands by connecting to Exchange Online like below:

Connect-ExchangeOnline

#Setting Proxy address for the user
Set-Mailbox UPNOfUser -EmailAddresses @{add="Proxy address"}

#Getting the User Proxy address
Get-AzureADUser -ObjectId ObjectIDofUser| ft proxyAddresses 

enter image description here

I tried to connect to the Exchange Online PowerShell using the User credentials and got the random error like below:

enter image description here

You can also set the Proxy address via Microsoft 365 admin center like below:

Go to Microsoft 365 admin center -> Users -> Active Users -> Click on the required user -> Manage username and email

enter image description here

Please note that, to set the Proxy address (alias) email attribute in PowerShell/Graph API/Admin Portal the user must have Admin role. The user without the Admin Privileges cannot perform this action in any method.

Related