Study guide

2.2 Implementing and Managing Domains

Microsoft 365 Administrator Expert MS-102

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 MS-102 Exam Facts & Blueprint 1.2 Registration, Retake & Renewal 1.3 Study Strategy & Using This Guide

2 Tenant Setup, Domains & Org Settings

2.1 Creating a Microsoft 365 Tenant 2.2 Implementing and Managing Domains 2.3 Configuring Org Settings: Security, Privacy & Profile

3 Service Health, Network & Software Updates

3.1 Monitoring Service Health & Notifications 3.2 Network Connectivity Insights 3.3 Configuring & Monitoring Software Updates

4 Adoption, Usage & Microsoft 365 Backup

4.1 Monitoring Adoption & Usage 4.2 Configuring & Managing Microsoft 365 Backup

5 Users, Contacts, Groups & Shared Mailboxes

5.1 Creating & Managing Users Including External Users 5.2 Creating & Managing Contacts 5.3 Managing Microsoft 365 Groups & Shared Mailboxes

6 Licensing & Bulk User Management

6.1 Managing & Monitoring Microsoft 365 Licenses 6.2 Bulk User Management with Graph & Entra PowerShell

7 Roles, Admin Units & Privileged Identity Management

7.1 Implementing & Managing Roles in M365 & Entra ID 7.2 Managing Permissions for Defender XDR, Purview & Workloads 7.3 Managing Delegation with Administrative Units 7.4 Managing Entra ID Roles in PIM

8 Identity Synchronization with Entra Connect

8.1 Preparing for Identity Synchronization & IdFix 8.2 Directory Sync with Entra Connect Sync & Cloud Sync 8.3 Monitoring Sync with Entra Connect Health 8.4 Troubleshooting Synchronization

9 Authentication, SSPR & Password Protection

9.1 Implementing & Managing Authentication Methods 9.2 Self-Service Password Reset (SSPR) 9.3 Microsoft Entra Password Protection 9.4 Investigating & Resolving Authentication Issues

10 Identity Protection, Conditional Access & MFA

10.1 Planning for Identity Protection 10.2 Implementing Entra Identity Protection 10.3 Planning & Implementing Conditional Access Policies 10.4 Managing MFA with Conditional Access

11 Defender XDR Posture, Incidents & Threat Intelligence

11.1 Security Exposure Management & Secure Score 11.2 Incidents, Alerts & Advanced Hunting 11.3 Reviewing Defender XDR Reports 11.4 Defender Threat Intelligence

12 Defender for Office 365: Policies, Alerts & Investigation

12.1 Threat Policies & Rules in Defender for Office 365 12.2 Configuring Alert Policies 12.3 Investigating & Responding to Email Threats

13 Attack Simulation & Restricted Entities

13.1 Managing Attack Simulations & Training 13.2 Managing Restricted Entities & Blocked Users

14 Defender for Endpoint

14.1 Onboarding Devices to Defender for Endpoint 14.2 Configuring Endpoint Settings 14.3 Defender Vulnerability Management Dashboard

15 Defender for Cloud Apps

15.1 Configuring the App Connector for Microsoft 365 15.2 Defender for Cloud Apps Policies & Alerts 15.3 Interpreting the Activity Log 15.4 Cloud App Discovery

16 Purview Information Protection & Data Lifecycle

16.1 Sensitive Information Types 16.2 Retention Labels & Policies 16.3 Sensitivity Labels & Policies 16.4 Monitoring Label Usage: Content & Activity Explorer

17 Purview Data Loss Prevention

17.1 DLP Policies for Microsoft 365 Workloads 17.2 Configuring Endpoint DLP 17.3 Reviewing & Responding to DLP Alerts, Events & Reports

18 Final Review & Exam Strategy

18.1 Exam-Day Strategy & Question Handling 18.2 Final Review Checklist & Next Steps

2.2 Implementing and Managing Domains

Key Takeaways Explain This Topic AI

Custom domains are added in the Microsoft 365 admin center and verified by adding a TXT (recommended) or MX record at the DNS provider; verification proves ownership of the public namespace

Beyond verification, each M365 service needs specific DNS records: MX for Exchange Online mail routing, CNAME for Autodiscover, TXT for SPF, CNAME for DKIM signing, and SRV for Teams/Skype for Business federation

Exchange Online accepted domains have three types: Authoritative (mailboxes live in Exchange Online), Internal Relay (some recipients have on-prem mailboxes, used in hybrid), and External Relay (all mail routed elsewhere)

Setting a custom domain as the default changes the UPN suffix assigned to new users, aligning user sign-in name with email address and simplifying identity for end users

DKIM and DMARC are configured separately from the SPF TXT record and together form modern email authentication; DMARC uses the SPF and DKIM results to instruct receivers how to handle failing mail

Last updated: August 2026

Quick Answer: Adding a custom domain in Microsoft 365 means proving ownership via a DNS TXT (or MX) record, then adding the service-specific DNS records that route mail (MX), enable client auto-config (CNAME Autodiscover), authenticate senders (SPF TXT, DKIM CNAME, DMARC TXT), and enable Teams/Skype federation (SRV). Exchange Online classifies each accepted domain as Authoritative, Internal Relay, or External Relay. Setting a domain as default changes the UPN suffix used for new users.

Adding a Custom Domain

Every tenant ships with the initial *.onmicrosoft.com domain. Most organizations add one or more custom public domains (e.g., contoso.com ) so email, SharePoint, and Teams use the org's own namespace. The high-level flow in the Microsoft 365 admin center → Settings → Domains → Add domain is:

  • Enter the domain name (e.g., contoso.com )
  • Choose verification method — Microsoft recommends a TXT record , but an MX record is also supported
  • Add the provided DNS record at your DNS hosting provider (GoDaddy, Cloudflare, Azure DNS, Route 53, etc.)
  • Click Verify — Microsoft queries public DNS for the record and, if found, marks the domain verified

Choose which services to configure (Exchange, Teams, Intune) and add the additional DNS records the wizard provides

Verification proves you own the namespace. It is a one-time step per domain; the verification record can be left in place or removed after verification succeeds (leaving it is harmless and simplifies re-verification).

Tip: If your DNS provider is one of the supported registrars integrated into the M365 admin center (GoDaddy, Cloudflare, and several others), the wizard can write the records for you after you sign in. Otherwise you copy the records manually.

DNS Records Required for Microsoft 365 Services

After verification, each service you enable needs specific DNS records. The M365 admin center's domain setup wizard lists exactly what to add. The following table is the authoritative reference shape — know it for the exam.

  • | DNS record | Purpose | Typical value |
  • ||--|--|--|
  • | TXT (verification) | Proves domain ownership | Random token provided by M365, e.g., MS=ms12345678 |

| MX | Routes inbound email to Exchange Online | Points to <tenant>.mail.protection.outlook.com , priority 0 or 10 |

| TXT (SPF) | Authorizes sending mail servers for the domain | v=spf1 include:spf.protection.outlook.com -all |

| CNAME (Autodiscover) | Lets Outlook/mobility clients auto-configure | autodiscover → autodiscover.outlook.com |

| CNAME (DKIM) | Enables DKIM signing for the domain — two records, selector1 and selector2 | selector1._domainkey → selector1-contoso-com._domainkey.contoso.onmicrosoft.com (and selector2._domainkey → selector2-… ). Newly created domains are issued the modern …-v1.dkim.mail.microsoft form instead. |

| TXT (DMARC) | Instructs receivers how to handle SPF/DKIM failures | v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc@contoso.com |

| SRV (SIP federation) | Enables Teams/Skype for Business federation and IM presence | _sipfederationtls._tcp → port 5061, target sipfed.online.lync.com |

| CNAME (MDM/Intune enrollment) | Enables mobile device management enrollment | enterpriseregistration → enterpriseregistration.windows.net |

MX Record Specifics

The MX record for Exchange Online always points to <tenant-name>.mail.protection.outlook.com , where <tenant-name> is the part of the initial .onmicrosoft.com domain before the suffix. The MX priority should be lower (higher priority) than any on-premises mail server's MX if you are running a hybrid configuration, or the only MX for the domain in a cloud-only setup. Do not point the MX at a specific mailbox server — it points at the Exchange Online Protection (EOP) edge.

SPF, DKIM, and DMARC — Modern Email Authentication

Email authentication is a recurring exam theme. Three DNS-based mechanisms work together:

SPF (Sender Policy Framework) — a TXT record listing which IP addresses/services are authorized to send mail for the domain. For M365-only senders: v=spf1 include:spf.protection.outlook.com -all . The -all is a hard fail; ~all is a soft fail used during rollout.

DKIM (DomainKeys Identified Mail) — adds a cryptographic signature to outbound mail. Mail sent from the tenant's initial *.onmicrosoft.com domain is DKIM-signed automatically, but for each custom domain you must publish the two selector CNAMEs and then enable DKIM in the Microsoft Defender portal → Email authentication settings → DKIM . Note the boundary: enabling DKIM here signs mail that leaves through Exchange Online . It does nothing for a third-party bulk-mail service sending as your domain — that provider must publish its own DKIM selector records and be added to your SPF record.

DMARC (Domain-based Message Authentication, Reporting & Conformance) — a TXT record at _dmarc.<domain> that tells receivers what to do when SPF or DKIM fail: p=none (monitor), p=quarantine (send to junk), p=reject (drop). DMARC also defines reporting addresses ( rua / ruf ).

The recommended rollout order is SPF → DKIM → DMARC p=none (monitor) → tighten to quarantine → reject . Skipping to reject before SPF/DKIM are aligned causes legitimate mail to be dropped.

Exchange Online Accepted Domains

Once a verified custom domain is used for email, it appears as an accepted domain in Exchange Online (managed in the Exchange admin center → Mail flow → Accepted domains). Three types exist:

Type Description Use case

Authoritative All recipients for the namespace have mailboxes in Exchange Online Cloud-only org; no on-prem recipients for that domain

Internal Relay Some recipients have on-premises mailboxes; Exchange Online relays to them via a connector Hybrid (Exchange hybrid with on-prem servers)

External Relay All mail for the namespace is relayed to an external system outside the org Shared namespace or partner scenarios; rare in standard deployments

Accepted domain type interacts with email address policies (the rules that stamp the primary SMTP address on each mailbox) and with outbound connectors that route mail to on-premises or partner systems.

Default Domain and UPN Suffix

Each tenant has one default domain — the domain used to complete a new user's UPN and primary email address when no domain is explicitly chosen. Initially the default is the .onmicrosoft.com domain. After you add and verify a custom domain, you can set it as the default in Settings → Domains → (select domain) → Set as default .

Changing the default domain changes the UPN suffix assigned to new users. It does not retroactively change existing users' UPNs — those must be updated separately, either in the M365 admin center user edit flow or in bulk with Microsoft Graph PowerShell ( Update-MgUser -UserId <id> -UserPrincipalName <new UPN> ). Do not reach for the legacy Set-MsolUserPrincipalName : the MSOnline module is retired (see section 6.2). Aligning UPN with the user's email address simplifies sign-in and reduces support tickets, because users can use one value for both M365 sign-in and email.

Domain Health and Troubleshooting

The Domains page in the M365 admin center shows a health/status column per domain. Common issues:

DNS propagation delay — new or edited DNS records can take minutes to 48 hours to propagate globally; verify with nslookup or dig against public resolvers

Misconfigured MX — mail flow stops or bounces; the Domains page flags missing or wrong-priority MX records

SPF too restrictive or too loose — -all with missing authorized senders drops legitimate mail; +all or missing SPF invites spoofing

DKIM not enabled — outbound mail fails DMARC alignment; enable DKIM in the Defender portal for each custom domain

DMARC set to reject prematurely — drops mail from unconfigured sending services; start with p=none and review reports

Removed or changed verification record — generally harmless after verification, but some flows require the record to be present

Removing and Replacing Domains

You can remove a custom domain from the tenant, but only after you reassign all users, groups, and resources that reference it (UPN suffixes, primary SMTP addresses, SharePoint sharing URLs). The .onmicrosoft.com initial domain cannot be removed. Microsoft also blocks removing a domain that is still set as the default — you must first set another domain as default.

  • Key Takeaways
  • Verify domain ownership with a TXT (preferred) or MX record at your DNS provider
  • Each M365 service needs specific DNS records — know the MX/SPF/Autodiscover/DKIM/SRV set
  • Accepted domains are Authoritative, Internal Relay, or External Relay; Internal Relay is the hybrid case
  • Setting a custom domain as default changes the UPN suffix for new users, aligning sign-in with email
  • Enable SPF, then DKIM, then DMARC starting at p=none ; do not jump to reject until alignment is verified