How to unify phone number format in email signatures or automatic replies

This article describes how to unify phone number format in your email signatures or automatic replies.

CodeTwo Email Signatures 365 takes users’ contact information directly from Microsoft Entra ID (Azure Active Directory). This means that the information found in signatures is always consistent with Entra ID, both when it comes to content and format. Unfortunately, it often means that phone number format is not the same for everyone or the format found in Entra ID differs from what you want to see in email signatures.

Attributes manager is a free tool which lets admins control and manage user details that are added to email signatures. To learn more about how it works and how to use it, watch this short video:

Basics

This article shows how to configure CodeTwo Email Signatures 365 for a specific usage scenario. If you need more basic information, use the links below:

How to configure program for this scenario

There are two different ways to unify phone number format with Attributes manager:

  • Let users specify the number format themselves. This option gives users some freedom in managing their own data that is shown in email signatures. Users can update their contact info and decide what phone number format is optimal for their signatures.
  • Unify phone number format globally. This is an advanced option that lets administrators unify phone numbers’ format in email signatures for all mailboxes, without changing anything in Entra ID (Azure AD).

Let users specify the number format themselves

Attributes manager gives you control over user details added to email signatures and autoreplies. You, as an admin, can make some of those user attributes editable. One of the many possibilities it gives to end users is deciding on the phone number format.

Note

This guide shows how to unify mobile phone numbers. You can apply the same steps to any other attribute, like Phone, Fax, or any custom attribute.

  1. Go to attributes.codetwo.com and sign in with global admin credentials of your Microsoft 365 tenant.
  2. On the Attribute visibility tab, make the Mobile attribute editable for end users by clicking the checkbox shown in Fig. 1. It’s worth making other attributes visible to end users as well, to provide them with some context.

Checkbox that makes the Mobile attribute editable.
Fig. 1. Checkbox that makes the Mobile attribute editable.

  1. When a user goes to user.codetwo.com, they will be able to see their attribute values taken from Microsoft Entra ID (Fig. 2.). The exact fields available for the user depend on admin-controlled settings (Fig. 1.).

My user info page.
Fig. 2. My user info page.

  1. In this example, the user can freely modify their mobile phone number. After making changes and clicking Save and update (Fig. 3.), user data is automatically updated in CodeTwo Azure AD cache. The next time this user’s email signature is added, the mobile phone number will have the user-specified value.

Save & update button available after editing an attribute.
Fig. 3. Save & update button available after editing an attribute.

Unify phone number format globally

This method lets an admin change format for every mailbox. It requires PowerShell access to the tenant.

  1. Connect to Entra ID (Azure AD) via PowerShell using the Connect-AzureAD cmdlet. If you don’t have the AzureAD PowerShell module installed, you can do so by running:
    Install-Module AzureAD
  2. Next, run the following script to save mailboxes’ mobile phone numbers to a CSV file:
    $Users = Get-AzureADUser <# The cmdlet gets all users’ data from Azure AD and saves it to the $Users array. You can filter and limit the exported data, e.g., with the -Filter parameter #>
    
    $Users | foreach {$_.mobile -replace "[^0-9]"} <# This line removes all non-numerical characters from mobile phones. Thanks to this, it will be easy to apply custom formatting to all numbers at once. #>
    
    $Users | select -Property @{Name = 'UPN'; Expression={$_.UserPrincipalName}},Mobile | Export-csv -path "c:\mobile.csv" -NoTypeInformation -Encoding UTF8 -Delimiter ";" <# This part creates a CSV file with two columns – UPN and mobile. Thanks to that, it will be easier to upload it to CodeTwo Azure AD cache later on. In this example, the CSV file is saved to c:\mobile.csv #>
  3. Open the CSV file in Microsoft Excel, highlight all phone numbers, right-click them and click Format Cells (Fig. 4.).

 Accessing cell format options in Excel
Fig. 4. Accessing cell format options in Excel.

  1. In the newly opened window, you can freely change the number format of all selected cells at once. You can, for example, use the built-in phone number format as shown below (Fig. 5.). The Custom category lets you apply various different data formats. Click OK when done and save the file.

Applying the default phone number format.
Fig. 5. Applying the default phone number format.

  1. With the CSV file ready, go to attributes.codetwo.com. On the Import/Export tab, click Import from CSV (Fig. 6.).

Importing user data from a CSV file.
Fig. 6. Importing user data from a CSV file.

  1. Select your CSV file and choose Selective import (Fig. 7.). This way, only the values for the users included in the CSV will be updated in CodeTwo Azure AD cache.

Choosing the selective import method.
Fig. 7. Choosing the selective import method.

Result

As soon as users save their changes or you import the data from the CSV file, new phone format is applied to email signatures (Fig. 8.).

Unified phone number format in email signatures
Fig. 8. Unified phone number format in email signatures.

In this article

Was this information useful?