How to set Office 365 custom attributes and use them in email signatures

[Update]: This article was first published on November 22, 2018. It’s been updated to present the new way for setting up custom attributes with the User attributes manager. To find out more, see this section of the article.

Similarly to the on-premises Exchange, Exchange Online contains several attributes you can set for each user. First name, last name, address, organization-related and contact information – it can all be set up in Office 365. While standard AD fields are enough for some Office 365 organizations, a non-standard field is sometimes needed. This is where custom attributes come in handy. In this article, I will discuss how to set up Office 365 custom attributes and show some of their applications.

Custom attributes in Office 365 set them up and use in email signatures

Why use Office 365 custom attributes?

There are 15 custom attributes in Exchange Online. They are similar to directory extension attributes known from the on-premises Exchange. They can be used to:

And these are just some of their applications. Custom attributes can be used in many other ways, especially by admins who want to filter results generated by various PowerShell cmdlets. However, before you begin using custom attributes, you have to set them up. Read on to learn how.

How to set up custom attributes in Office 365

There are two methods for setting up custom attributes in Office 365: using the Exchange admin center or PowerShell. Even though the first method uses a seemingly more friendly UI, you may actually find it much easier to use PowerShell. Compare the two approaches below and decide for yourself.

Editing custom attributes using the Exchange admin center

  1. Sign in to the Exchange admin center.
  2. Go to Recipients > Mailboxes.
    Displaying user mailboxes in the Exchange admin center (EAC).
  3. Select a user with an active mailbox to access their properties. Then, go to Others > Custom attributes.
    Accessing custom attributes settings in the Exchange admin center.
  4. You’ll see the list of the Office 365 custom attributes whose values you can modify for the selected user. To apply any changes, use the Save button when you finish editing the attributes’ values.
    The pane that lets you set up Office 365 custom attributes for the selected user.

Editing custom attributes using PowerShell

Before you start editing, check if custom attributes have already been populated:

Get-mailbox [email protected] | FL CustomAttribute*

To edit the first custom attribute for a single user, use the following cmdlet:

Set-Mailbox [email protected] -CustomAttribute1 <the new value>

You can change a custom attribute for a group of users or for all users:

Get-Mailbox | Set-Mailbox -CustomAttribute5 <the new value>

And if you combine PowerShell with a properly formatted CSV file, you will be able to bulk-populate chosen/all the custom attributes with values for selected users. It’s a bit more complex process but lets you save a lot of time. Here’s how it goes:

  1. Prepare your CSV file (here I’m using Excel, but you can do it in any software that supports CSV files, e.g. Notepad):
    • the header of the first column (the A1 cell) must be named UPN,
    • the next column headers (B1C1D1, etc.) must be named CustomAttribute1CustomAttribute2CustomAttribute3, and so on, depending on how many attributes you want to populate with data,
    • the first column must contain the value for User Principal Name (UPN) for each of your users (UPN is often identical to your user’s email address but it’s not always the case – you can learn more about it from this article),
    • the next columns should contain the values that you want to save to given Exchange Online custom attributes.

Have a look at a sample CSV file below:

CSV file with custom attributes for bulk update.

  1. Once you’ve finished editing the CSV file, save it as CSV UTF-8 (Comma delimited) to a location of your choice.
  2. Launch Windows PowerShell with administrative privileges.
  3. Connect to Exchange Online, as explained here.
  4. Run the script below, replacing <CSV file location> with the actual location of the CSV file you saved in step 2.

Import-Csv <CSV file location> | % { Set-Mailbox $_.'UPN' -CustomAttribute1 $_.CustomAttribute1 -CustomAttribute2 $_.CustomAttribute2 -CustomAttribute3 $_.CustomAttribute3 -CustomAttribute4 $_.CustomAttribute4 }

Protip: The above script populates the custom attributes 1-4 in Exchange Online. If you also want to populate attributes numbered 5 and higher with data, simply add the -CustomAttributeX $_.CustomAttributeX snippet inside the curly brackets as many times as you want, replacing X with the number of a custom attribute. Of course don’t forget to supplement your CSV file with more columns and data before.

  1. Finally, remember to disconnect from Exchange Online.

Wait some time for the changes to propagate.

As you can see, setting up custom attributes using PowerShell is much quicker than going through the UI, especially if you need to change those properties in bulk.

Using custom attributes in email signatures

To use custom attributes in email signatures, you need CodeTwo Email Signatures 365.

CodeTwo Email Signatures 365 is an Office 365 email signature management service that allows you to unify email signatures and disclaimers in an organization, regardless of email clients and mobile devices used.

Office 365 custom attributes in email signatures

You can use a placeholder in an email signature template to insert an individual value of your users’ custom attribute. This simple action allows you to:

  • Add one-click customer satisfaction surveys to your emails. One-click surveys are an easy way to collect feedback about your services from your customers. Most people are not willing to fill in a lengthy questionnaire about their customer experience. One-click surveys allow a much more friendly option of just clicking a rating button. Read more about CSAT surveys in email signatures.
  • Provide scheduling links. A scheduling link in an email signature is a great way to make it easier for customers to book a demo or any other kind of meeting. Instead of troublesome back-and-forth emails to book time, you can automatically direct your customers to your or your team’s calendar. It is especially helpful if you and your customer reside in different time zones. Read more about the easy scheduling of meetings.
  • Add additional contact details. In some cases, you need to add additional contact information or specific IDs to your email disclaimer. Using custom attributes, you can add any kind of user-specific attribute to their email signature, automatically.
  • Run A/B tests of your marketing campaigns. If you insert different links as users’ custom attributes, you can use the exact same email signature template with different banners and landing pages. As a result, you can easily let your marketing team test the effectiveness of their email campaigns.

Free ebook: 5 Best Practices for Effective Email Communication

How to use Office 365 custom attributes in email signatures

Using a custom attribute in CodeTwo Email Signatures 365 is much easier and quicker than adding one in Exchange Online. All you need to do is open the signature template editor, pick a placeholder with the custom attribute you need, and every user’s signature will be personalized using the values of attributes selected.

In addition to the use cases mentioned in the previous section of this article, you can also add social media buttons linking for example to your employees’ LinkedIn profiles automatically:

Add LinkedIn social media link 2

You can also add a link to WhatsApp chat in the HTML code directly:

Add custom attribute to HTML

If you don’t want to add a link to every user’s signature, you can always leave the Office 365 custom attribute field empty and add the {RT} tags:

RT tags in CodeTwo Email Signatures for Office 365

This way, if a given attribute is not defined for a user (the field in Entra ID / Azure Active Directory is empty), the whole element between the {RT} tags will not appear in this user’s email signature.

Learn more about using custom attributes in CodeTwo Email Signatures 365

Using CodeTwo User attributes manager

Another way of enhancing your email signatures with custom attributes is the User attributes manager. The tool is free to use for any organization that has an active subscription for CodeTwo Email Signatures 365, and lets you conveniently setup and control (standard and) custom attributes – both individually and in bulk – within one cloud-based email signature management solution.

What’s more, thanks to the User attribute manager, you are no longer limited to 15 custom attributes available in Exchange Online. In case they are already used up in your organization, you can simply create new CodeTwo custom attributes to use in your email signatures. These will be listed in the signature template editor next to the native custom attributes, so you can easily insert them like any other attribute:

Adding new CodeTwo custom attributes

Traditionally, all placeholders used in your email signatures are populated with the data pulled from your Microsoft Entra ID (Azure Active Directory). The User attributes manager, on the other hand, lets you manage the placeholders without making any changes to Entra ID itself. All the information is stored in a local cache, which speeds up the management and propagation of any edits.

Finally, with the manager, you can also allow end users to view and edit their own signature information. This ensures personalized and accurate email signatures without the risk of modifying your organization’s Entra ID data.

Watch this short video to get the general idea of the User attributes manager or click the link below the video to find more detailed information.

Learn more about the User attributes manager and CodeTwo custom attributes

More about Office 365 email signatures

Email signatures are often a neglected aspect of communication in organizations. CodeTwo Email Signatures 365 lets you upgrade your organizational email signature from an invisible addition to an invaluable, attractive asset. Build your branding and gain more marketing opportunities thanks to our software.

Suggested reading:

CodeTwo Email Signatures 365 is the first and only email signature solution that’s fully Microsoft 365 Certified (the whole infrastructure reviewed & pen-tested by Microsoft). It's an Azure-based cloud service that supports all devices and email apps. Our product was co-engineered and awarded by Microsoft, and has the highest user satisfaction ratings. With CodeTwo's ISO/IEC 27001 & 27018 certification and our proprietary 4-layer security system, it's the most secure signature solution on the market. Watch a short product video

CodeTwo offers solutions for organization-wide email signature management, data backup and migration for Microsoft 365 & Exchange Server, developed since 2007 and used by over 120k organizations worldwide, including Facebook, Samsung and UNICEF.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


CodeTwo sp. z o.o. sp. k. is a controller of your personal data.
See our Privacy Policy to learn more.