🚨 Problem
Users intermittently receive:
“We couldn’t authenticate you” in Microsoft Teams
Observed behavior
Happens randomly (not constant)
More likely on corporate Ethernet
Web apps (portal.office.com) still work
Unplugging/replugging Ethernet temporarily fixes it
✅ Fix (Do This First)
On the affected computer:
Settings → Accounts → Access work or school
👉 Look for ANY account that is NOT your organization
Example:
EXTERNAL_ORG_ACCOUNT
👉 Click it → Disconnect
👉 Restart the computer
🎯 Result
Teams authentication stabilizes
Issue no longer recurs
🧪 Why This Happens (Simple Explanation)
The device has multiple Work Accounts from different organizations.
Windows attempts to authenticate using the wrong one.
WAM (Windows authentication system) → sees multiple identities → may select wrong tenant → authentication fails
🔍 Optional Verification (No Admin Access Required)
Step 1 — Open Azure Cloud Shell
Go to:
https://portal.azure.com
Click:
>_ (Cloud Shell icon, top-right)
Select:
Bash
Step 2 — Run this command (no PIM escalation required)
read -p "Enter first name or user ID: " f; read -p "Enter last name (optional): " l; if [ -n "$l" ]; then flt="startswith(givenName,'$f') and startswith(surname,'$l')"; else flt="startswith(userPrincipalName,'$f') or startswith(givenName,'$f') or startswith(displayName,'$f')"; fi; { echo -e "Device\tOS\tDeviceId\tLastSeen\tUser\tUPN"; az rest --method GET --url "https://graph.microsoft.com/v1.0/users?\$filter=$flt&\$select=id,displayName,userPrincipalName" -o json | jq -r '.value[] | .id as $uid | .displayName as $name | .userPrincipalName as $upn | [$uid,$name,$upn] | @tsv' | while IFS=$'\t' read -r uid name upn; do az rest --method GET --url "https://graph.microsoft.com/v1.0/users/$uid/registeredDevices?\$select=displayName,operatingSystem,id,approximateLastSignInDateTime" -o json 2>/dev/null | jq -r --arg name "$name" --arg upn "$upn" '.value[] | [.displayName,.operatingSystem,.id,(.approximateLastSignInDateTime//""),$name,$upn] | @tsv'; done; } | column -t -s $'\t'
Step 3 — Review output
You are looking for:
Devices with recent activity
Names that do not match your organization’s standard naming
Example:
DEVICE_FROM_EXTERNAL_TENANT Windows 2026-02-28T...
Step 4 — Confirm on the device
Run on the affected computer:
dsregcmd /status
Look for:
WorkplaceTenantName : EXTERNAL_ORG
💥 Root Cause
The device is registered to:
your organization ✔
AND another external organization ❌
This causes:
Authentication conflicts during token refresh
🔁 Why It Appears Intermittent
Network changes (Ethernet reconnect) trigger authentication refresh
Windows re-evaluates identity selection
Sometimes correct identity is used → works
Sometimes incorrect identity is used → fails
🧠 Key Insight
Microsoft Graph does not provide direct ownership classification for devices.
To identify the issue, we used:
Device enumeration
Last activity timestamps
dsregcmd /status correlation
🛠 Resolution Summary
Remove external Work Account from:
Settings → Accounts → Access work or school
👍 Notes
- No PIM activation required in Azure CLI
Works using standard user access