How to Create and Manage Contacts in Exchange Online Microsoft 365
Managing external contacts efficiently is vital for any organization using Microsoft 365. Whether it’s for keeping track of partners, vendors, or external consultants, Exchange Online offers robust capabilities to create and manage mail contacts and mail users within the Microsoft 365 environment.
In this blog, we’ll walk through the essentials of creating and managing contacts in Exchange Online, using both the Microsoft 365 admin center and PowerShell.
📌 What Are Mail Contacts?
Mail contacts are external email addresses stored in your Exchange Online directory. They appear in the Global Address List (GAL) and are used for sending mail to people outside your organization without giving them access to internal resources.
They are different from:
- Mail users, who also have external email addresses but are assigned credentials to access internal resources.
- Mail-enabled users, which is another term for mail users.
✅ When Should You Use Mail Contacts?
Use mail contacts when you:
- Frequently email external stakeholders (vendors, partners).
- Want external users listed in your GAL.
- Don’t need to provide them access to Microsoft 365 services.
📁 Create Mail Contacts via Microsoft 365 Admin Center
Steps:
- Go to Microsoft 365 Admin Center.
- Navigate to “Users” > “Contacts”.
- Click “Add a contact”.
- Fill in the required fields:
- First name, Last name
- Display name
- Email address (external)
- Company, Department (optional)
- Click Add.
Once created, the contact will appear in the Global Address List within Outlook and other Microsoft 365 apps.
💻 Create Mail Contacts via Exchange Online PowerShell
For bulk operations or automated processes, PowerShell is the best route.
Connect to Exchange Online:
powershellCopyEditConnect-ExchangeOnline
Create a mail contact:
powershellCopyEditNew-MailContact -Name "John Smith" -ExternalEmailAddress "john.smith@externaldomain.com" -FirstName "John" -LastName "Smith" -OrganizationalUnit "Contacts"
Optional: Add to distribution group
powershellCopyEditAdd-DistributionGroupMember -Identity "External Partners" -Member "John Smith"
🛠️ Manage Existing Contacts
You can:
- Edit details (name, company, email).
- Hide from GAL (useful for cleanup).
- Remove contacts no longer needed.
Hide from GAL via PowerShell:
powershellCopyEditSet-MailContact -Identity "John Smith" -HiddenFromAddressListsEnabled $true
🔁 Bulk Contact Creation (PowerShell + CSV)
Here’s a quick script for creating multiple contacts from a CSV:
Sample CSV: contacts.csv
csvCopyEditName,ExternalEmailAddress,FirstName,LastName
Jane Doe,jane.doe@external.com,Jane,Doe
Mark Lee,mark.lee@external.com,Mark,Lee
PowerShell Script:
powershellCopyEdit$contacts = Import-Csv -Path "contacts.csv"
foreach ($contact in $contacts) {
New-MailContact -Name $contact.Name `
-ExternalEmailAddress $contact.ExternalEmailAddress `
-FirstName $contact.FirstName `
-LastName $contact.LastName
}
🔒 Security & Compliance Notes
- Contacts cannot access internal resources—no licenses are required.
- You can apply mail flow rules (transport rules) to external contacts.
- Auditing is available for administrative changes in the Compliance Center.
Creating and managing mail contacts in Exchange Online streamlines external communications and simplifies address book management. Whether you prefer a GUI-based approach or automation through PowerShell, Microsoft 365 offers flexible tools for IT admins to get the job done efficiently.