Create and manage contacts
Contacts are people outside of your organization that you would like everyone to be able to find. You can use these contacts for sending emails to these external parties. In Exchange Online organizations, mail contacts are mail-enabled objects that contain information about people who exist outside your organization. Each mail contact has an external email address, but the mail contact is visible in your organization's shared address book (also known as the global address list or GAL) and other address lists.
Mail contacts are different from mail users:
- Mail users have an email address in the organization's domain.
- Mail contacts have an email address outside of the organization's domain.
Organizations can use mail contacts in various scenarios. For example, when you need to send email to someone outside of your organization, but you don't want to create a user account for them in your organization's directory. You can also create a mail contact for a vendor, a customer, or a partner, and then use that contact to send them email.
Organizations can manage mail contacts in the Microsoft 365 admin center, in both the new and classic Exchange admin center (EAC), and in Exchange Online PowerShell. This training examines contact management using the Microsoft 365 admin center and PowerShell. For instruction on using the EAC, see Manage mail contacts in Exchange Online.
Permissions needed to create mail contacts
You must have the necessary permissions to create mail contacts in the Microsoft 365 admin center The required permissions can come from the Global Administrator, or one of the following roles:
- Exchange Administrator. Members of this role can create Contacts using the EAC and the Microsoft 365 admin center.
- Directory Writers. These individuals can create Contacts using the Microsoft 365 admin center.
If you don't have the necessary permissions, you can't create mail contacts in the Microsoft 365 admin center. You can either request the required permissions from an administrator in your organization, or ask them to create the mail contacts on your behalf. If you need to manage who can create Contacts, consider configuring a group for users with the necessary permissions.
Create a contact using the Microsoft 365 admin center
Perform the following steps to create mail contacts in the Microsoft 365 admin center:
- In the Microsoft 365 admin center, select Users in the navigation pane, and then select Contacts.
- In the Contacts window, select Add a contact on the menu bar.
- In the Add a contact pane that appears, update the following fields. The system requires settings marked with an *.
- First name
- Last name
- *Display name. By default, this box shows the values from the First name and Last name boxes. You can accept this value or change it.
- *Email: Enter the user's email address. The domain should be external to your cloud-based organization.
- Hide from my organization's global address list. This option isn't selected by default. If you leave this check box blank, everyone in your organization can see this contact in the GAL.
- Profile information. Optionally enter the contact's company information, including Company name, Office and Mobile phone numbers, Title, Web site, address, and so on.
- Mail tip
- First name
- Select Add and then select Close.
Note
After adding a contact, you should allow 30 minutes for the changes to take effect.
Remove a contact using the Microsoft 365 admin center
Perform the following steps to remove a mail contact in the Microsoft 365 admin center:
- In the Microsoft 365 admin center, select Users in the navigation pane, and then select Contacts.
- Select the check box next to the contact that you want to delete.
- Select the Delete contact option in the menu bar.
- In the Delete [display name] pane that appears, select Delete to confirm the deletion.
- Select Close once the contact is deleted.
Note
The Microsoft 365 admin center doesn't allow bulk edit or removal of mail contacts yet. You must complete bulk editing of mail contacts using either the classic EAC or Exchange Online PowerShell. For instruction on how to bulk edit using the classic EAC, see Manage mail contacts in Exchange Online.
Use Exchange Online PowerShell to create mail contacts
This example creates a mail contact for Debra Garcia using the Exchange Online PowerShell module.
- The name and display name is Debra Garcia (if you don't use the DisplayName parameter, the system uses the value of the Name parameter for the display name).
- The alias is dgarcia.
New-MailContact -Name "Debra Garcia" -ExternalEmailAddress dgarcia@tailspintoys.com -Alias dgarcia
For detailed syntax and parameter information, see New-MailContact.
Use Exchange Online PowerShell to modify mail contacts
In general, use the Get-Contact and Set-Contact cmdlets to view and change organization and contact information properties. Use the Get-MailContact and Set-MailContact cmdlets to view or change mail-related properties. For example, email addresses, the MailTip, custom attributes, and whether the system hides the contact from address lists.
For more information, see the following articles:
The following examples show how you can change mail contact properties using Exchange Online PowerShell:
This example configures the Title, Department, Company, and Manager properties for the mail contact Allan Deyoung.
Set-Contact "Allan Deyoung" -Title Consultant -Department "Public Relations" -Company Fabrikam -Manager "Alex Wilber"
This example sets the CustomAttribute1 property to a value of PartTime for all mail contacts and hides them from the organization's address book.
$Contacts = Get-MailContact -Resultsize unlimited
$Contacts | foreach {Set-MailContact -Identity $_ -CustomAttribute1 PartTime -HiddenFromAddressListsEnabled $true}
This example sets the CustomAttribute15 property to a value of TemporaryEmployee for all mail contacts in the Public Relations department.
$PR = Get-Contact -ResultSize unlimited -Filter "Department -eq 'Public Relations'"
$PR | foreach {Set-MailContact -Identity $_ -CustomAttribute15 TemporaryEmployee}
Use Exchange Online PowerShell to remove mail contacts
To remove a mail contact, run the following command:
Remove-MailContact -Identity <MailUserIdentity>
This example removes the mail contact for Nestor Wilke:
Remove-MailContact -Identity "Nestor Wilke"