MS-102 Deploy and manage a Microsoft 365 tenant Practice Question
A company has a Microsoft 365 tenant that uses the default contoso.onmicrosoft.com domain. The IT team wants to add a new custom domain, contoso.com, and ensure that all existing users' primary email addresses automatically change to the new domain. They also want to prevent users from signing in with the onmicrosoft.com domain. What should the administrator do first?
⚠ Common exam trap
The trap here is assuming that changing a user's UPN or email address policy will automatically add and verify a new domain, but domain verification must occur first.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Add contoso.com as a custom domain in the Microsoft 365 admin center and verify ownership by adding a TXT record to the public DNS zone.
Before any custom domain can be used in Microsoft 365, it must be added and verified in the admin center. Verification typically involves adding a TXT record to the domain's DNS. Only after verification can the domain be assigned to users, set as default, or used for sign-in. Changing UPNs or email address policies requires the domain to exist first.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Modify the default email address policy in Exchange Online to use contoso.com as the primary SMTP suffix.
Why it's wrong here
An email address policy can only use domains that are already verified and added to the Microsoft 365 tenant. Since contoso.com has not been added, the policy cannot reference it. The domain must first be verified through the admin center, after which an email address policy could be configured if desired.
- ✗
Create a new mail-enabled security group for all users and assign the contoso.com SMTP address to the group.
Why it's wrong here
Creating a mail-enabled security group does not add a custom domain to the tenant. The domain must be verified through the Microsoft 365 admin center before it can be used for any email routing or address assignment. This action would not enable users to have contoso.com email addresses or change their sign-in domain.
- ✗
Run the Set-MsolUserPrincipalName PowerShell cmdlet to change each user's UPN to contoso.com.
Why it's wrong here
Set-MsolUserPrincipalName changes a user's UPN, but it fails if the target domain contoso.com has not been added and verified in the tenant. The domain must exist as a verified domain before it can be used in a UPN. Attempting to change UPNs first will result in an error because the domain is not recognized by Microsoft Entra ID.
- ✓
Add contoso.com as a custom domain in the Microsoft 365 admin center and verify ownership by adding a TXT record to the public DNS zone.
Why this is correct
Adding and verifying the custom domain is the mandatory first step before it can be used for email addresses or sign-in. Verification proves domain ownership via a DNS TXT record. Until the domain is verified, you cannot assign it to users, set it as default, or change UPN suffixes. This action directly enables the subsequent steps of updating user principal names and email addresses.
Go deeper
Related to this question
Learn chapter
Communication Compliance Policies
Key term
Microsoft 365
Microsoft 365 is a subscription-based cloud service from Microsoft that combines productivity tools like Office apps with security, device management, and online storage.
Key term
Custom domain
A custom domain is a personalized internet address (like contoso.com) that you can use with cloud services instead of the default domain provided by the service provider.
About these practice questions
Courseiva writes every MS-102 question from scratch — 712 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
This MS-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MS-102 exam.