• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Mister PKI

SSL Certificates * SSL Tools * Certificate Decoder

  • PKI Training
  • OpenSSL
  • Keytool
  • PKI Tools
    • Apereo CAS
    • SAML
    • OpenID Connect
  • Get expert help

Proxy Addresses Active Directory

March 20, 2023 by Mister PKI Leave a Comment

This article will demonstrate how to manage proxy addresses in Active Directory and define what exactly the proxyAddresses AD attribute is.

The proxyAddresses attribute is multivalued and is used on users, groups, and contacts in Active Directory to facilitate email delivery.

The following table describes the semantics for the prefix usage of the proxy addresses.

PrefixDescription
SMTPThe primary (sending) email address
smtpSecondary email addresses. Also known as aliases.

Note that duplicate addresses are not allowed across your entire Active Directory. Take caution when modifying this attribute as you can break email for the object being modified.

If you are trying to modify an O365 email alias in the O365 admin portal and you have a local authoritative AD, you may see the following message.

This user is synchronized with your local ‎Active Directory‎. Some details can be edited only through your local ‎Active Directory‎.

Follow the instructions below to modify the O365 mail alias and perform an AD Connect sync at the end.

Proxy Addresses Active Directory with PowerShell

The proxyAddresses attribute can be modified with Active Directory Users and Computers, but this article will demonstrate how to manage it with PowerShell. Note that if you are not on a domain joined computer, you will have to provide the credential as part of the command. The culminating script provided below will do just that.

These examples assume that the ActiveDirectory PowerShell module is installed.

Import-Module ActiveDirectory

Follow these steps to manage proxy addresses for a user object.

Get AD User with PowerShell

Use the Get-ADUser command to retrieve the user being modified. Make sure to include the proxyAddresses attribute in your retrieval.

$user = Get-ADUser <samAccountName> -Properties proxyAddresses -Credential <credential>

Add a proxy address using PowerShell

Using the $user object above, add a proxy address. This example is adding a new secondary or alias email address.

$user.proxyAddresses.Add("smtp:<new-proxy-address>")

Remove a proxy address using PowerShell

$user.proxyAddresses.Remove("smtp:<new-proxy-address>")

Save the proxy address attribute

Use the Set-ADUser command with the same $user object to save the updates to the proxyAddresses attribute.

Set-ADuser -instance $user

Display the proxyAddresses attribute

Now that you have made changes to the proxyAddresses attribute, display them to verify the change was successful.

Get-ADuser <samAccountName> -Properties proxyAddresses -Credential <credential>

The output should display the proxyAddresses attribute and look similar to the following.

proxyAddresses    : {smtp:secondary@example.com, SMTP:primary@example.com,
                    smtp:third@example.com}

Take note that only one SMTP (in all caps) is allowed as it is the primary.

To print each proxy address separately you can write a short PowerShell script to do so.

$credential = Get-Credential ""
$samAccountName = Read-Host -Prompt "Enter samAccountName"
$User = Get-ADUser -Identity $samAccountName -Properties proxyAddresses -Credential $credential
ForEach ($proxyAddress in $User.proxyAddresses) {
        $Output = $Object.distinguishedName + ";" + $proxyAddress
        Write-Host $Output
}

Use this convenience script to auto prompt for the required values needed to update proxy addresses.

Sync proxyAddresses change with Azure

After modifying the proxyAddresses attribute for a user you may want to immediately sync with Azure. We documented how to do so in this article. This is useful when modifying O365 mailbox aliases. If you do not need to immediately sync you can wait on your regularly schedule AD Connect sync to run, which is usually on a 30 minute interval.

Conclusion – Proxy Addresses Active Directory

This article has demonstrated how to add, remove, and query the active directory proxy addresses attribute. Let us know in the comments if you have any questions or would like to see further examples on modifying the proxyAddresses Active Directory attribute. If you found this article helpful, please read more of our PowerShell content.

active directory,  Identity Management,  powershell

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Popular Posts

PKCS12

openssl s_client

Keytool

Keytool list

ECDSA vs RSA

OpenSSL

PKCS7

Certificate Decoder

PKI for DevOps Engineers – Free Training Series

PKI for DevOps Training Hub

Lesson 1 – How TLS and PKI Work

Lesson 2 – Understanding X.509 Certificates

Lesson 3 – Certificate Chains Explained

Lesson 4 – Debug TLS with OpenSSL

Lesson 5 – Verify Certificate Chains

Lesson 6 – Creating CSRs with OpenSSL

Lesson 7 – Working with PKCS12 Certificates

Lesson 8 – Java Keystores and keytool

Lesson 9 – Certificate Expiration Monitoring

Lesson 10 – Automating Certificate Renewal

Lesson 11 – Common TLS Errors

Lesson 12 – PKI Architecture for DevOps

Recent Posts

  • Apache mod_auth_cas: Protect Web Applications with Apereo CAS and Docker
  • Apache mod_auth_mellon: Configure SAML SSO & Docker
  • Configure OpenID Connect (OIDC) in Apereo CAS 7.3 and 8
  • Certificate Ownership Is an Operating Model Problem, Not a Tooling Problem
  • OpenSSL dgst: Create Checksums and Verify Digital Signatures

Footer

  • Twitter
  • YouTube
Mister PKI

Practical security engineering for the systems that establish trust.

Learn OpenSSL Keytool Free training
Work together PKI consulting CAS consulting Sponsored contributions
Site About Support Mister PKI Cookie policy Search
© 2026 Mister PKI Secure systems. Clear guidance.