Lesson 40 of 60 intermediate

Microsoft 365 & Entra Basics

The modern identity and productivity stack

Open interactive version (quiz + challenge)

Real-world analogy

M365 + Entra is the digital office building for most companies. Mail, chat, documents, meetings, identity, device posture — one tenant. If you keep this clean, the whole company works. If you don’t, every user feels it.

What is it?

M365/Entra administration is the modern productivity stack. Most corporate IT work happens here. Juniors who can create users, assign licenses, configure MFA and CA, manage distribution groups, and pull audit logs are instantly useful.

Real-world relevance

HR onboards 5 new hires. You create accounts from an existing template, assign correct groups (which drives licensing and Teams/SharePoint access), enforce MFA registration, enroll devices in Intune, and share a welcome checklist. No tickets for 30 days afterward.

Key points

Code example

// M365 / Entra — daily ops snippets (PowerShell + admin UI)

# Connect
Connect-MgGraph -Scopes "User.ReadWrite.All","Group.ReadWrite.All","Directory.Read.All"
Connect-ExchangeOnline

# Create a new user
New-MgUser -DisplayName "Alice Rahman" -UserPrincipalName "alice@contoso.com" \
  -MailNickname "alice" -AccountEnabled:$true \
  -PasswordProfile @{Password="TempP@ssw0rd!";ForceChangePasswordNextSignIn=$true}

# Assign license (replace GUIDs with your plan IDs)
Set-MgUserLicense -UserId alice@contoso.com -AddLicenses @(@{SkuId="ENTERPRISEPACK-GUID"}) -RemoveLicenses @()

# Add to a group
Add-MgGroupMember -GroupId <groupId> -DirectoryObjectId (Get-MgUser -UserId alice@contoso.com).Id

# Message trace (Exchange Online)
Get-MessageTrace -SenderAddress alice@contoso.com -StartDate (Get-Date).AddDays(-2) -EndDate (Get-Date)

# Export risky sign-ins (Entra Identity Protection) via portal or Graph
# Review recent risky users and risky sign-ins for that tenant

Line-by-line walkthrough

  1. 1. Daily M365 snippets
  2. 2. Connect to Graph with scopes
  3. 3. Connect to Exchange Online
  4. 4. Blank separator
  5. 5. Create user block
  6. 6. Assign license block
  7. 7. Add to group
  8. 8. Blank separator
  9. 9. Message trace example
  10. 10. Blank separator
  11. 11. Risky sign-in export note

Spot the bug

To ‘fix’ a user’s email problem quickly, a junior makes the user Global Admin.
Need a hint?
Which policies and audit concerns does this violate?
Show answer
Least privilege (no need for Global Admin to fix user email); audit trail (privileged actions without justification); risk amplification (stolen GA account = tenant compromise). Correct: assign the smallest necessary role (e.g., Exchange Admin or Helpdesk Admin), with justification and time-limited assignment via PIM where possible.

Explain like I'm 5

M365 is the office, Entra is the security desk. Desks, chairs, meeting rooms, chat, email — all work because the security desk knows who you are and what you’re allowed to touch.

Fun fact

Microsoft has moved the M365 admin experience across several portals and brand names over a decade (Office 365 Admin Center → Microsoft 365 Admin Center; Azure AD → Entra). Junior admins should learn concepts, not logos.

Hands-on challenge

Sign up for a Microsoft 365 Developer tenant (free). Create 3 users, 1 security group, 1 distribution list, enforce MFA, configure a basic conditional access policy requiring MFA for all users. Note what you saw.

More resources

Open interactive version (quiz + challenge) ← Back to course: IT Jobs Bootcamp