Library

Guides Quick Fixes Scripts Find a Guide

Tools

Error Decoder Assessment Baselines Free Tools Service status What's Changed

More

AI Certifications For MSPs Recommended Gear Field Kit FAQ About Contact Get Assessment

Opens on Sign-in problems. Search always covers all 61 fixes in every category. Links like ?cat=devices, ?q=lockout or ?cat=all open a filtered view. A situation filters the same list; a search or category chip clears it. Try ?path=signin.

Common fixes for Microsoft Entra ID and Microsoft 365, grouped by category
FixCategoryWhat to do
Decode an AADSTS sign-in errorSign-in problems

A user sees an AADSTS code: look it up first, then follow the fix.

Steps and links

A user sees an AADSTS code, or a sign-in log entry shows one. Look it up in the decoder, then follow the fix. The most common codes:

Find out why Conditional Access blocked a sign-inSign-in problems

Read the Conditional Access tab of the failed sign-in, then test with the What If tool.

Steps and links

Open the failed event in the sign-in logs and read its Conditional Access tab to see which policy applied and why, then use the sign-in diagnostic or the What If tool (Troubleshoot sign-in problems with Conditional Access (opens in a new tab); What If tool (opens in a new tab)).

Export sign-in logs for a failure you are chasingSign-in problems

When the portal view isn’t enough, export sign-ins with CA status and failure reason to CSV.

Steps and links

Export sign-ins with Conditional Access status, failure reason and client app, then filter the CSV.

Check whether it’s Microsoft, not youSign-in problems

Check service status and known update issues before an hour of troubleshooting.

Steps and links

Before you spend an hour troubleshooting, check service status and known Microsoft update issues.

Unlock a user locked out by smart lockout (AADSTS50053)Sign-in problems

An admin password reset unlocks the cloud account now; SSPR with “I forgot my password” resets the lockout too.

Steps and links

By default smart lockout locks an account after 10 failed attempts (three in US Government tenants); the first lockout is one minute and gets longer after repeated failures. An admin can unlock a cloud account without waiting by resetting the password, and a user who picks I forgot my password in SSPR resets the lockout to zero (How smart lockout works (opens in a new tab)). Changing the threshold or duration needs Microsoft Entra ID P1 (Manage smart lockout values (opens in a new tab)).

Stop repeated sign-in or MFA promptsSign-in problems

A user can sign in, but keeps getting password or MFA prompts. Check sign-in frequency, persistent browser session, and conflicting Remember MFA settings.

Steps and links

This is for a user who can sign in, but is prompted for a password or MFA again and again. That is a session-lifetime issue, not a Conditional Access block. If the sign-in actually fails, use Find out why Conditional Access blocked a sign-in instead (Microsoft Entra multifactor authentication prompts and session lifetime (opens in a new tab)).

Microsoft Entra ID's default sign-in frequency is a rolling 90-day window. The most restrictive session setting in the tenant wins. Combining Remember multifactor authentication with Show option to remain signed in, or leaving Remember MFA enabled alongside Conditional Access Sign-in frequency, can prompt users more often than you expect (Microsoft Entra multifactor authentication prompts and session lifetime (opens in a new tab); Configure adaptive session lifetime policies (opens in a new tab)).

You'll need: at least Conditional Access Administrator to review or change session controls (Microsoft Entra ID P1 or P2). To review Show option to remain signed in, the session-lifetime article signs you in as a Global Administrator. To review Remember MFA, sign in as at least an Authentication Policy Administrator. Microsoft Entra ID Free or Microsoft 365 Apps tenants use the Stay signed in? branding setting instead of Conditional Access session controls.

Steps

  1. Confirm the user is being reprompted, not blocked. Open the user's sign-in log entry and check that the sign-in succeeded, then look at which Conditional Access policies applied and whether a Session control is present (Troubleshoot sign-in problems with Conditional Access (opens in a new tab)).
  2. If the tenant has Microsoft Entra ID P1 or P2, sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator and go to Entra ID > Conditional Access > Policies. Open every policy that includes the user and look under Access controls > Session (Configure adaptive session lifetime policies (opens in a new tab)):
    • Sign-in frequency set to a short period, or to Every time, causes first- and second-factor prompts at that interval (on both clients and the browser). Every time is tolerated to about five minutes so users are not prompted more often than once every five minutes.
    • Persistent browser session requires the policy to target All cloud apps. It overrides the Stay signed in? company branding setting for the same user.
  3. Before you rely on Sign-in frequency, disable Remember MFA on trusted devices if it is still on. Using those two settings together might prompt users unexpectedly (Configure adaptive session lifetime policies (opens in a new tab)):
    • Sign in as at least an Authentication Policy Administrator.
    • Go to Entra ID > Multifactor authentication.
    • Under Configure, select Additional cloud-based MFA settings.
    • On the Multifactor authentication service settings pane, scroll to Remember multifactor authentication settings and clear the checkbox if you are moving to Sign-in frequency.
  4. Review Show option to remain signed in only if you do not already use a Persistent browser session policy (the Conditional Access setting overrides branding for the same user):
  5. If more than one of these settings is on, keep only the set that matches the license: Conditional Access Sign-in frequency and Persistent browser session when you have P1 or P2; Show option to remain signed in when you do not. Microsoft recommends not mixing Remember MFA with Stay signed in (Microsoft Entra multifactor authentication prompts and session lifetime (opens in a new tab)).

If that didn't work

Microsoft Learn sources

Reset MFA for a user who lost or replaced their phoneMFA & passwords

Require re-register MFA on the user’s Authentication methods page; they set up a new method at next sign-in.

Steps and links

An Authentication Administrator can select Require re-register MFA on the user’s Authentication methods page; the user is asked to set up a new method at the next sign-in. Users can change their own methods in Security info (aka.ms/mysecurityinfo) (Manage a user’s authentication methods (opens in a new tab)).

Find users with no MFA method registeredMFA & passwords

See who isn’t MFA-capable yet before you tighten MFA or Conditional Access.

Steps and links

Before you tighten MFA or Conditional Access, see who isn’t MFA-capable yet with the official registration details report.

Reset a user’s password as an adminMFA & passwords

Password Administrator or higher: Users > select the user > Reset password, then hand over the temporary password.

Steps and links

Sign in as at least a Password Administrator, go to Entra ID > Users, select the user and choose Reset password. Microsoft Entra ID generates a temporary password; the user must change it at the next sign-in. For users synced from on-premises AD you can only reset if password writeback is on and the domain is managed; federated domains must be changed on-premises. You can’t reset passwords for guests whose home is another tenant (Reset a user’s password (opens in a new tab)).

Get a user with no working method back in (Temporary Access Pass)MFA & passwords

Issue a time-limited Temporary Access Pass so the user can register Authenticator or a passkey.

Steps and links

A Temporary Access Pass lets a user sign in and register a passwordless method such as Authenticator or a passkey. Enable the Temporary Access Pass policy under Authentication methods > Policies first, then on the user’s Authentication methods page select Add authentication method (Temporary Access Pass (opens in a new tab)).

User can’t use self-service password resetMFA & passwords

“Your administrator has not enabled you to use this feature” usually means SSPR scope, license or registration.

Steps and links

Check that SSPR is set to Selected or All and the user is in the enabled group (only one group can be chosen in the admin center; nested groups are supported), that the user has a license, and that they registered enough methods. The SSPR_00xx code on the error tells you which one; SSPR_0010 means password writeback isn’t enabled (SSPR errors a user might see (opens in a new tab)).

Find users still on per-user MFAMFA & passwords

Report who is per-user MFA Enabled or Enforced before you move to Conditional Access.

Steps and links

Per-user MFA states can be read with Microsoft Entra PowerShell (Manage per-user MFA (opens in a new tab)). Move those users to Conditional Access or security defaults, then turn per-user MFA off.

SSPR succeeded in the cloud, but the on-premises password didn't changeMFA & passwords

Self-service password reset or change appears to work in Microsoft Entra ID, but the Active Directory password is unchanged. Troubleshoot password writeback.

Steps and links

Use this when the user can complete self-service password reset or a password change in Microsoft Entra ID, but the on-premises Active Directory password does not update. If SSPR is not offered at all ("Your administrator has not enabled you to use this feature"), start with User can't use self-service password reset instead.

Password writeback, enabled with Microsoft Entra Connect or Microsoft Entra Cloud Sync, writes cloud password changes back to the on-premises directory in real time (Troubleshoot self-service password reset writeback (opens in a new tab)). It needs at least a Microsoft Entra ID P1 license (Tutorial: Enable Microsoft Entra self-service password reset writeback (opens in a new tab)).

You'll need: Hybrid Identity Administrator to check or change On-premises integration in the Microsoft Entra admin center, plus administrator access on the Microsoft Entra Connect server and sufficient Active Directory rights to inspect the connector account.

Steps

  1. Sign in to the Microsoft Entra admin center as at least a Hybrid Identity Administrator. Go to Entra ID > Password reset, then choose On-premises integration. Confirm Write back passwords to your on-premises directory is selected. If you use Cloud Sync, also confirm Write back passwords with Microsoft Entra Connect cloud sync when provisioning agents are detected (Tutorial: Enable Microsoft Entra self-service password reset writeback (opens in a new tab)).
  2. On the Microsoft Entra Connect server, confirm writeback is enabled in the Microsoft Entra Connect configuration wizard (or PowerShell). If the feature already looks enabled, Microsoft's first recovery path is to disable and re-enable it (Troubleshoot self-service password reset writeback (opens in a new tab)):
    • Open the Microsoft Entra Connect Configuration wizard as an administrator on the Connect server.
    • In Connect to Microsoft Entra ID, enter your Microsoft Entra Hybrid Identity Administrator credentials. In Connect to AD DS, enter on-premises admin credentials.
    • In Uniquely identifying your users, select Next.
    • In Optional features, clear Password writeback, continue to Ready to configure, confirm writeback shows as disabled, and select Configure.
    • On Finished, clear Synchronize now, select Finish, then reopen the wizard and repeat the same pages, this time selecting Password writeback.
  3. If writeback still fails, follow Microsoft's connectivity sequence in order (Troubleshoot self-service password reset writeback (opens in a new tab)):
    • Confirm outbound HTTPS (TCP 443) from the Connect server to *.passwordreset.microsoftonline.com and *.servicebus.windows.net (different endpoints apply in US Government and Azure China).
    • On the Connect server, open Event Viewer (Windows Logs > Application) and look for event IDs 31034 or 31019. Use the Service Bus namespace in those events with Test-NetConnection -ComputerName <namespace>.servicebus.windows.net -Port 443.
    • Confirm TLS 1.2 and Microsoft .NET Framework 4.8 or higher on the sync server, using the check and enable scripts linked from that article.
    • Restart the Microsoft Entra Connect Sync service: services.msc, find the Azure AD Sync entry (the Microsoft Entra Connect sync service), and select Restart.
  4. Confirm the Active Directory Domain Services connector account has the rights writeback needs: Reset password, Change password, write on lockoutTime and pwdLastSet, and the Unexpire Password extended right. You can identify the account from Synchronization Service Manager (Start > Synchronization Service > Connectors > the AD DS connector > Properties > Connect to Active Directory Forest) and review effective permissions, or use Set-ADSyncPasswordWritebackPermissions from the ADSyncConfig module (Tutorial: Enable Microsoft Entra self-service password reset writeback (opens in a new tab); Troubleshoot password writeback access rights and permissions (opens in a new tab)).
  5. If some accounts never update, check that permission inheritance is not disabled on those users, and that the on-premises Minimum password age group policy is not blocking an immediate reset (Microsoft recommends 0 for writeback to work most efficiently) (Tutorial: Enable Microsoft Entra self-service password reset writeback (opens in a new tab)).

If that didn't work

  • Event SSPR_0029 ("Your organization hasn’t properly set up the on-premises configuration for password reset") with a management agent "denied access" in the Connect event log often means the Network access: Restrict clients allowed to make remote calls to SAM policy does not include the MSOL_ connector account (Troubleshoot self-service password reset writeback (opens in a new tab)).
  • After a Connect restart, look for Application event 6800: writeback was configured but the password writeback endpoint did not start.
  • If the previous steps fail, the troubleshoot article's later options are to install the latest Microsoft Entra Connect release (back up customized sync rules first) and, as a last documented step, disable and re-enable writeback again after that upgrade. Open a support request with the tracking ID and event log if it still fails.

Microsoft Learn sources

Stop cloud passwords expiring (whole tenant or one account)MFA & passwords

Older tenants can still have a 90-day expiry. Set the organization policy to never expire in the Microsoft 365 admin center, or set one account to never expire with Graph PowerShell, and know why switching back can force mass password changes.

Steps and links

Warning: Passwords set to never expire still age. If you later switch expiration back on (-PasswordPolicies None, or a days value in the admin center), every password with a LastPasswordChangeDateTime older than 90 days must be changed at next sign-in, which can hit a large number of users at once (Set a password to never expire (opens in a new tab)).

Use this when cloud users keep getting forced password changes. The default for Microsoft Entra ID is no expiration, but tenants created before 2021 default to 90 days (Microsoft Entra password policies (opens in a new tab)). The Microsoft 365 admin center labels never-expire as (recommended) and suggests MFA to cover the risk of weak or reused passwords (Set the password expiration policy (opens in a new tab)).

This applies to cloud-only users. The admin center setting doesn't apply to hybrid users who use password hash sync, pass-through authentication or federation such as AD FS (Synchronize user password hashes (opens in a new tab)).

You'll need: User Administrator.

Steps

  1. Check the current state (read-only; Learn's command, run as at least User Administrator) (Check the expiration policy (opens in a new tab)): powershell Connect-MgGraph -Scopes "User.Read.All" Get-MgUser -All -Property UserPrincipalName, PasswordPolicies | Select-Object UserPrincipalName, @{N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"}} | Export-Csv .\password-never-expires.csv -NoTypeInformation The tenant-level expiry for each domain can be read with Get-MgDomain.
  2. Whole organization: Microsoft 365 admin center > Settings > Org Settings > Security and Privacy > Password expiration policy. Select Set passwords to never expire (recommended) and Save. (To make passwords expire instead, clear the box and enter 14 to 730 days.) (Set password expiration policy (opens in a new tab))
  3. One account only (Changes data), for example a kiosk or service account that must stay cloud-only: powershell Connect-MgGraph -Scopes "User.ReadUpdate.All" Update-MgUser -UserId kiosk01@contoso.com -PasswordPolicies DisablePasswordExpiration User.ReadUpdate.All is the least-privileged delegated permission for updating a user (Update user (opens in a new tab)).

If that didn't work

  • A newly added domain still expires passwords: the policy is per managed domain. After adding a domain or converting one from federated to managed, re-save the organization policy so it updates all domains (New and federated domains (opens in a new tab)).
  • Synced users still expire: by default only users not synced through Microsoft Entra Connect can be set not to expire (Password expiration policies (opens in a new tab)).
  • Outlook-only users weren't prompted when their password expired: they aren't forced to reset until the cached credential expires, which can take days; there's no admin workaround (Important things to know (opens in a new tab)).
  • The account also had DisableStrongPassword: passwordPolicies can hold both values, for example DisablePasswordExpiration, DisableStrongPassword. Check the current value in step 1 before you set it, and include both if the account needs both (Update user (opens in a new tab)).

Microsoft Learn sources

Test a Conditional Access policy before you enforce itConditional Access

Run new or changed policies in report-only mode and check the results first.

Steps and links

Before you turn on a new or changed policy, run it in report-only mode and check the results, so you don’t lock people out (Report-only mode and policy impact (opens in a new tab)).

Back up Conditional Access policies before a changeConditional Access

Export policies to JSON so you have a copy and can see every inclusion and exclusion.

Steps and links

Export your policies to JSON first so you have a copy and can see every inclusion and exclusion in one place.

Find what still uses legacy authenticationConditional Access

Filter the sign-in logs by Client app for legacy protocols, on both interactive and non-interactive tabs.

Steps and links

As at least a Reports Reader, open Entra ID > Monitoring & health > Sign-in logs, add the Client App column, filter Client App to the legacy authentication protocols, and repeat on the User sign-ins (non-interactive) tab (Identify legacy authentication use (opens in a new tab)).

Check whether security defaults are onConditional Access

Entra ID > Overview > Properties > Manage security defaults; you need Conditional Access Administrator.

Steps and links

Sign in as at least a Conditional Access Administrator and go to Entra ID > Overview > Properties > Manage security defaults (Enabling security defaults (opens in a new tab)). Moving to Conditional Access? Follow Microsoft’s steps to replace security defaults (Move to Conditional Access (opens in a new tab)).

Block sign-ins from countries you never useConditional Access

Create a countries named location, then a report-only policy that blocks it, excluding break-glass.

Steps and links

Create a named location for the countries, then a Conditional Access policy that blocks that location; start in report-only and exclude your emergency access accounts (Block access by location (opens in a new tab)).

Locked out by a Conditional Access policyConditional Access

An enforced Conditional Access policy is blocking admin sign-in. Use an excluded emergency access account or another unblocked Conditional Access or Global Administrator to disable or fix the policy.

Steps and links

Use this when an enforced Conditional Access policy is blocking administrative sign-in to Microsoft Entra ID or the portals you need to change that policy. This is recovery after a bad policy is already on, not a per-user "which policy failed?" investigation (use Find out why Conditional Access blocked a sign-in for that) and not the checkup that emergency accounts exist (see Check your break-glass (emergency access) accounts).

Microsoft documents two recovery paths: an administrator who can still sign in disables or updates the policy, and a Microsoft support request if no administrator in the organization can update it (What to do if you're locked out (opens in a new tab)). Emergency access (break-glass) accounts exist so you still have a Global Administrator that can sign in when other admin accounts are blocked, provided those accounts are excluded from Conditional Access policies that block or restrict sign-in (Manage emergency access accounts (opens in a new tab)).

Do not use undocumented bypasses.

You'll need: a working emergency access account that is excluded from enforced Conditional Access, or another administrator who is not blocked, with a role that can edit Conditional Access policies (Conditional Access Administrator or Global Administrator). Configuring session or Conditional Access policies is documented as at least Conditional Access Administrator (Configure adaptive session lifetime policies (opens in a new tab)).

Steps

  1. Sign in with an emergency access account, or with another administrator who is not blocked by the policy. Emergency access accounts should be cloud-only Global Administrators, with a phishing-resistant method (a passkey or certificate-based authentication), a permanent active Global Administrator assignment if you use PIM, and an exclusion from every Conditional Access policy that blocks or restricts sign-in. Report-only policies do not block access and do not need an exclusion (Manage emergency access accounts (opens in a new tab)).
  2. Sign in to the Microsoft Entra admin center as a Conditional Access Administrator or Global Administrator. Go to Entra ID > Conditional Access > Policies.
  3. Identify the policy that is blocking sign-in. If you can open the failed sign-in first, use Entra ID > Monitoring & health > Sign-in logs, open the event, and read the Conditional Access tab; selecting the policy name opens that policy for review and editing (Troubleshoot sign-in problems with Conditional Access (opens in a new tab)).
  4. Disable the policy, or edit it so it no longer blocks the administrators who need to manage the tenant. Then save the change. Typical causes of a tenant-wide lockout are policies that target all users and all resources with Block access, or with Require device to be marked as compliant, Require Microsoft Entra hybrid joined device, or Require app protection policy when admins cannot meet that grant (Select "all" consequences (opens in a new tab)).
  5. After access is restored, put a dedicated security group that contains only the emergency access accounts (for example, EmergencyAccess) in the Exclude list of every Conditional Access policy that blocks or restricts sign-in, and confirm the accounts can still sign in (Manage emergency access accounts (opens in a new tab)). Keep a backup of policies before the next change: Back up Conditional Access policies before a change.

If that didn't work

If no administrator in your organization can update the policy, submit a support request (opens in a new tab). Microsoft support reviews and, after confirming, updates the Conditional Access policies that prevent access. Include the request ID, time, and date from a sign-in event when you have one.

Microsoft Learn sources

Cut off a compromised or departing user nowCompromised accounts

Disable the account, revoke sessions, and disable their devices; reset the password twice on-premises if hybrid.

Steps and links

In the admin center: Entra ID > Users, select the user, clear Account enabled, then select Revoke sessions. Disabling needs User Administrator (Privileged Authentication Administrator for admins); disabling devices needs Cloud Device Administrator. In hybrid tenants, disable the user in AD and reset the password twice first (Revoke user access in an emergency (opens in a new tab)). Access tokens last one hour by default, so a token already issued can keep working until it expires (Access and refresh tokens (opens in a new tab)).

Handle a user flagged as riskyCompromised accounts

Reset the password or confirm the compromise; dismiss the risk only after you have checked.

Steps and links

Admins can generate a temporary password, require a password change, dismiss the user’s risk, or confirm the user is compromised. User Administrator is the least privileged role to reset passwords and Security Operator to dismiss risk; full ID Protection features need Microsoft Entra ID P2 or Microsoft Entra Suite (Remediate risks and unblock users (opens in a new tab)).

A user reports an MFA prompt they didn’t startCompromised accounts

Treat it as a likely password compromise: reset the password and check their sign-ins.

Steps and links

With Report suspicious activity on, the user can report the prompt from Authenticator; users who report a prompt are set to High user risk (Report suspicious activity (opens in a new tab)). Then follow the response steps in the guide.

Find out who changed a user, group, app or policyCompromised accounts

The audit logs record changes to users, groups, apps and licenses, with old and new values.

Steps and links

Audit logs capture changes to applications, groups, users and licenses. Each entry shows the actor, the target and, where applicable, old and new values, and entries can’t be changed or deleted (Audit logs in Microsoft Entra ID (opens in a new tab)).

Investigate a risky sign-in and confirm, dismiss, or mark it safeCompromised accounts

Open the Identity Protection Risky sign-ins report, investigate the event, then confirm compromised, confirm safe, or dismiss the sign-in risk.

Steps and links

Use this when Identity Protection has flagged a sign-in, not only a user. User risk and sign-in risk are separate reports and separate feedback actions. For a user who is flagged, also see Handle a user flagged as risky and the full walkthrough in Investigate and Remediate Risky Users and Risky Sign-ins with ID Protection.

The Risky sign-ins report lists sign-ins that are at risk, confirmed compromised, confirmed safe, dismissed, or remediated, with real-time and aggregate risk, detection types, application, Conditional Access, MFA, device, and location details. It holds filterable data for up to the past 30 days and includes interactive and non-interactive sign-ins (use the sign-in type filter to change the view) (ID Protection risk reports (opens in a new tab)).

You'll need: Microsoft Entra ID P2 or Microsoft Entra Suite for full Identity Protection features (Investigate risk (opens in a new tab); Remediate risks and unblock users (opens in a new tab)). Learn is not consistent on the least-privileged role to view the reports: the investigate-risk article lists Global Reader, and the risk-reports article signs you in as at least a Security Reader at ID Protection > Dashboard. To take action, sign in as at least a Security Operator; action buttons stay greyed out for a lower-privileged role (Remediate risks and unblock users (opens in a new tab); ID Protection risk reports (opens in a new tab)). User Administrator is the least privileged role to reset passwords.

Steps

  1. Sign in to the Microsoft Entra admin center as at least a Security Operator (or as a Security Reader or Global Reader if you are only viewing the report). Go to Protection > Identity Protection > Risky sign-ins (Remediate risks and unblock users (opens in a new tab)). You can also start from ID Protection > Dashboard and open the Risky sign-ins report (ID Protection risk reports (opens in a new tab)).
  2. Open the sign-in and review the details pane: application, Conditional Access, MFA, device, location, risk state, risk level, and the detection source (ID Protection or Microsoft Defender for Endpoint).
  3. Investigate whether the activity is normal for that user before you give feedback. Check the same user's sign-in logs for the application, device, location, IP address, and user agent, and look for similar events. If you suspect the attacker can impersonate the user, require a password reset and MFA, or block the user and revoke refresh and access tokens, before you finish classifying the risk (Investigate risk (opens in a new tab)).
  4. Select the event and choose the feedback action that matches what you found (ID Protection risk reports (opens in a new tab); Provide risk feedback (opens in a new tab)):
    • Confirm sign-in compromised — a true positive. The sign-in stays risky until you remediate (for example, reset the password, revoke sessions, or block the user).
    • Confirm sign-in safe — a false positive. Similar sign-ins should not be considered risky in the future.
    • Dismiss sign-in risk — a benign true positive (for example a known penetration test or known activity from an approved application). Similar sign-ins should continue to be evaluated.
  5. If the sign-in was compromised and was not self-remediated by a risk-based Conditional Access policy, complete remediation: request a password change, block the user if the attacker might be able to reset the password or complete MFA, revoke refresh tokens, disable devices that are considered compromised, and if you use continuous access evaluation, revoke access tokens (Remediate risks and unblock users (opens in a new tab)).

If that didn't work

Microsoft Learn sources

Find and remove malicious Inbox rules and forwarding on a compromised mailboxCompromised accounts

After a mailbox compromise, check for hidden Inbox rules that forward, redirect or hide mail, and for mailbox-level forwarding, then disable or remove what the attacker added.

Steps and links

Warning: When you create, modify, remove, enable or disable an Inbox rule in Exchange PowerShell, any client-side rules created by Outlook in that mailbox are removed (Remove-InboxRule (opens in a new tab), Disable-InboxRule (opens in a new tab)). Export the rule list (step 3) before you change anything, so you can tell the user what to recreate.

Attackers in a business email compromise often add Inbox rules that forward mail to an outside address, or that move messages to Notes, Junk Email or RSS Subscriptions so the user doesn't see replies (Common symptoms (opens in a new tab)). Cut off the attacker's access first, then remove what they left behind.

You'll need: Exchange Online PowerShell, and permission to run the InboxRule and Mailbox cmdlets in your organization.

Steps

  1. Cut off the attacker first. Block sign-in, reset the password and revoke sessions: Cut off a compromised or departing user now. Microsoft's response order is: disable the account, revoke access, review MFA methods, app consents and admin roles, then mail forwarders (Secure and restore email functionality (opens in a new tab)).
  2. Check mailbox forwarding (Step 6: Review mail forwarders (opens in a new tab)): powershell Get-Mailbox -Identity jason@contoso.com | Format-List Forwarding*Address,DeliverTo* A value in ForwardingSmtpAddress means mail goes to an external recipient; ForwardingAddress means an internal one. DeliverToMailboxAndForward = False means the user doesn't get a copy. Remove any forwarding the user didn't set up.
  3. List every Inbox rule, including hidden ones, and save the output: powershell Get-InboxRule -Mailbox jason@contoso.com -IncludeHidden | Select-Object Name,Enabled,RedirectTo,ForwardTo,ForwardAsAttachmentTo,Identity | Export-Csv .\jason-inbox-rules.csv -NoTypeInformation Look for nonblank RedirectTo (mail isn't delivered to the mailbox), ForwardTo or ForwardAsAttachmentTo, rules the user didn't create, and rules with odd names. To see a full rule, run Get-InboxRule -Identity "<Identity>" -IncludeHidden | Format-List (Step 6 (opens in a new tab), -IncludeHidden (opens in a new tab)).
  4. Disable or remove the bad rule (Remediate using PowerShell (opens in a new tab)): powershell Disable-InboxRule -Mailbox jason@contoso.com -Identity "Suspicious Rule Name" Remove-InboxRule -Mailbox jason@contoso.com -Identity "Suspicious Rule Name" Disabling first keeps the evidence for your investigation. Get-InboxRule -Mailbox <user> | Remove-InboxRule removes all rules; use it only if the user agrees to recreate their own.
  5. Check what was sent. Review the user's Sent Items and run a message trace for the time window you find in the sign-in and audit logs (Investigate the compromised account (opens in a new tab)).

If that didn't work

Microsoft Learn sources

Unblock a user restricted from sending email (NDR 5.1.8)Compromised accounts

A user's mail bounces with 550 5.1.8 Access denied, bad outbound sender because they exceeded sending limits. Secure the account first, then remove them from Restricted entities in the Defender portal.

Steps and links

Warning: Exceeding outbound sending limits is an indicator of a compromised account. Regain control of the account before you unblock it, or the attacker starts sending again (Before you begin (opens in a new tab)).

When a user exceeds the service's outbound sending limits or the limits in an outbound spam policy, they can still receive mail but can't send it, and they're added to the Restricted entities page. Sent messages bounce with error 5.1.8: "550 5.1.8 Access denied, bad outbound sender" (Remove blocked users (opens in a new tab)).

You'll need: Security Administrator (Entra role, or the Exchange role group) or Exchange Organization Management to unblock. Global Reader or Security Reader can view the list. Works in all tenants with cloud mailboxes (Permissions (opens in a new tab)).

Steps

  1. Secure the account: reset the password, revoke sessions and check for attacker Inbox rules and forwarding (Cut off a compromised or departing user now, Find and remove malicious Inbox rules).
  2. Optional but useful: run the Blocked Sender History diagnostic (https://aka.ms/senderhistory) to see listing and delisting history and the sender's MFA status.
  3. In the Microsoft Defender portal, go to Email & collaboration > Review > Restricted entities (or https://security.microsoft.com/restrictedentities). Find the user; Entity shows Mailbox.
  4. Select the user's check box, then Unblock. Read the Overview and Recommendations, select Next, use the Enable MFA and Reset the user's password links if you haven't already, then Submit and confirm with Yes (Remove a user in the Defender portal (opens in a new tab)).
  5. Wait. Restrictions are usually removed within one hour, and Learn says the total wait shouldn't exceed 24 hours.

PowerShell alternative (Exchange Online PowerShell (opens in a new tab)):

Get-BlockedSenderAddress                                   # list restricted sendersRemove-BlockedSenderAddress -SenderAddress jason@contoso.com   # use the mailbox UPN

For a hosted mailbox, use its UPN, which doesn't have to match the primary SMTP address.

If that didn't work

Microsoft Learn sources

Check your break-glass (emergency access) accountsAdmin roles & tenant

At least two cloud-only accounts with phishing-resistant MFA, excluded from enforced CA and monitored.

Steps and links

Microsoft recommends at least two cloud-only emergency access accounts. Confirm they exist, use phishing-resistant MFA (a passkey or certificate-based authentication), are excluded from enforced Conditional Access policies, and are monitored (Manage emergency access accounts (opens in a new tab)).

Count and trim your Global AdminsAdmin roles & tenant

List who holds Global Administrator and other privileged roles, then move people to least privilege.

Steps and links

List who holds Global Administrator and other privileged roles, then move people to least-privilege roles.

Make admin roles eligible instead of permanentAdmin roles & tenant

Use Privileged Identity Management so admins activate a role when they need it.

Steps and links

With PIM, admins hold an eligible assignment and activate the role only when they need it. PIM requires licenses (PIM license requirements (opens in a new tab)); see the PIM row on License requirements.

Get a quick read on your tenant’s security postureAdmin roles & tenant

Fifteen questions give you a score and a short fix list; baselines give copyable starting points.

Steps and links

Fifteen questions in your browser give you a score and a short fix list; the baselines give you copyable starting points.

Approve or deny a pending PIM role activationAdmin roles & tenant

Open pending Microsoft Entra role requests in Privileged Identity Management and approve or deny the activation with a justification.

Steps and links

Use this when you are a delegated approver for a Microsoft Entra role in Privileged Identity Management (PIM) and a request is waiting. This is the approval queue, not the work of making roles eligible (see Make admin roles eligible instead of permanent).

Privileged Identity Management lets you require approval for role activation and choose one or more users or groups as delegated approvers. Approvers have 24 hours to approve; that window is not configurable. If the request is not approved in 24 hours, the eligible user must submit a new request (Approve or deny requests for Microsoft Entra roles in Privileged Identity Management (opens in a new tab)).

You'll need: to be a delegated approver for that role, or a Global Administrator or Privileged Role Administrator (those roles can view and cancel pending requests even when they are not the assigned approver). Using PIM requires a license; see License requirements (opens in a new tab) and Microsoft Entra ID Governance licensing fundamentals (opens in a new tab).

Steps

  1. Sign in to the Microsoft Entra admin center. Approvers also receive an email notification with a direct link to the request (Approve or deny requests for Microsoft Entra roles in Privileged Identity Management (opens in a new tab)).
  2. Go to ID Governance > Privileged Identity Management > Approve requests.
  3. In the Requests for role activations section, review the requests pending your approval.
  4. To approve: find and select the request. On the approve or deny page, enter the business justification in the Justification box, then select Submit. The system sends a notification of the approval.
  5. To deny: find and select the request, enter the business justification, and select Deny. A notification appears with your denial.

Approvers cannot approve their own role activation requests, and service principals cannot approve requests. The first approver who approves or denies resolves the request, and all approvers are notified of that response. Global Administrators and Privileged Role Administrators are notified when an approved user becomes active in their role (Approve or deny requests for Microsoft Entra roles in Privileged Identity Management (opens in a new tab)).

If that didn't work

  • If you are a Global Administrator or Privileged Role Administrator and believe an approved user should not be active, you can remove the active role assignment in Privileged Identity Management. Those administrators are not notified of pending requests unless they are an approver, but they can view and cancel any pending requests for all users from the pending-requests view (Approve or deny requests for Microsoft Entra roles in Privileged Identity Management (opens in a new tab)).
  • If 24 hours have already passed, the eligible user must submit a new request; the approval window cannot be extended.

Microsoft Learn sources

Give someone an admin role without making them Global AdminAdmin roles & tenant

Pick the least-privileged built-in role for the task, then assign it in the Microsoft 365 admin center or under Roles & admins in the Microsoft Entra admin center, or make it eligible in PIM if you have P2.

Steps and links

Use this when someone needs to help with admin work (resetting passwords, creating users, managing groups) and the quick answer would be "make them Global Admin". Microsoft's guidance is to assign the role needed for the specific task (Assign admin roles in the Microsoft 365 admin center (opens in a new tab)).

You'll need: at least Privileged Role Administrator to assign Microsoft Entra roles (Prerequisites (opens in a new tab)). With Microsoft Entra ID P2 and PIM you can make the assignment eligible or time-bound instead (Microsoft Entra roles in PIM (opens in a new tab)).

Steps

  1. Find the least-privileged role for the task in Least privileged roles by task (opens in a new tab). Examples from that page:
    • Reset passwords of non-admins: Password Administrator. Reset passwords of privileged admins: Privileged Authentication Administrator.
    • Create, read, update and delete users: User Administrator.
    • Create groups or manage group settings: Groups Administrator.
  2. Assign it, in either admin center:
  3. Limit the scope if you can. Some roles, such as Helpdesk Administrator, can be assigned to an administrative unit so they apply only to its members (Assign roles with administrative unit scope (opens in a new tab)).

PowerShell (Changes data; from Learn's example, scope RoleManagement.ReadWrite.Directory):

Connect-MgGraph -Scopes "RoleManagement.ReadWrite.Directory"$user = Get-MgUser -Filter "userPrincipalName eq 'alice@contoso.com'"$role = Get-MgRoleManagementDirectoryRoleDefinition -Filter "displayName eq 'Password Administrator'"New-MgRoleManagementDirectoryRoleAssignment -DirectoryScopeId '/' -PrincipalId $user.Id -RoleDefinitionId $role.Id

If that didn't work

Microsoft Learn sources

Stop non-admins browsing the Microsoft Entra admin centerAdmin roles & tenant

Turn on the user setting that hides common Entra admin center pages from non-admins, know what it doesn't block, and use Conditional Access on Windows Azure Service Management API when you need real enforcement.

Steps and links

Know this first: Microsoft says the Restrict access to Microsoft Entra administration portal setting is not a security measure. It adds friction to casual browsing, but it doesn't block PowerShell, Microsoft Graph or deep links, and it doesn't apply to anyone with an admin role, including custom roles (Restrict member users' default permissions (opens in a new tab)).

Use it to keep ordinary users from opening the admin center home, tenant overview and users list, for example on a school or frontline tenant. If you need enforcement, use Conditional Access (step 4).

You'll need: an admin who can change Microsoft Entra user settings (Learn's pages for this setting don't name a minimum role). Conditional Access in step 4 needs Microsoft Entra ID P1 and at least Conditional Access Administrator.

Steps

  1. In the Microsoft Entra admin center, go to Users > User settings (Restrict access to Microsoft Entra Admin Center (opens in a new tab)).
  2. Set Restrict access to Microsoft Entra admin center to Yes, then Save. (Learn's permissions article calls it "Microsoft Entra administration portal"; it's the same switch.)
  3. Let specific non-admins back in by giving them a role such as Global Reader (Restrict member users' default permissions (opens in a new tab)). Group owners who aren't admins can no longer manage their groups in the admin center; point them to other tools.
  4. For real enforcement, create a Conditional Access policy that targets the Windows Azure Service Management API resource for non-admins. Learn recommends this instead of relying on the switch. Test it in report-only first (Test a Conditional Access policy before you enforce it): that resource covers Azure Resource Manager and the Azure portal (including the Microsoft Entra admin center), and it indirectly affects services such as Azure PowerShell, Azure CLI and the Microsoft 365 admin center. It doesn't cover Microsoft Graph PowerShell (Windows Azure Service Management API (opens in a new tab)).

If that didn't work

  • A user still sees the admin center: check whether they hold any admin or custom role; the switch doesn't apply to them. Deep links to most pages keep working by design.
  • Users can still read the directory with PowerShell or Graph: expected. The switch doesn't block programmatic access. The separate "read other users" flag is Graph-only, and Microsoft doesn't recommend setting it to false because it can break other services such as Teams (Restrict member users' default permissions (opens in a new tab)).
  • You also want to stop users creating tenants: set Restrict non-admin users from creating tenants to Yes in the same user settings and assign the Tenant Creator role to anyone who still needs to (same article (opens in a new tab)).

Microsoft Learn sources

An app stopped working: check for an expired client secretApps & consent

Find expiring secrets and certificates, add the new credential, update the app, then remove the old one.

Steps and links

Client secrets can last at most 24 months and Microsoft recommends under 12; certificates or federated credentials are preferred over secrets for production (Add and manage app credentials (opens in a new tab)).

Review what an enterprise app can accessApps & consent

Enterprise apps > the app > Permissions shows admin and user consent; revoke what isn’t needed.

Steps and links

As at least a Cloud Application Administrator, open Entra ID > Enterprise apps > All applications, select the app and open Permissions. Learn also has Microsoft Graph PowerShell to list and revoke delegated grants and application permissions (Review permissions granted to enterprise applications (opens in a new tab)).

Find out why a device is not compliantDevices & Intune

Open the compliance policy’s device status and per-setting status in Intune.

Steps and links

In the Intune admin center, go to Devices > Compliance, select the policy, then View report or Per-setting status to see which setting failed. A setting in Error keeps the previous state for up to seven days before the device turns Not compliant (Monitor device compliance results (opens in a new tab)).

Check a device’s join state with dsregcmd /statusDevices & Intune

Run dsregcmd /status on the device and read AzureAdJoined, DomainJoined and the PRT fields.

Steps and links

Run dsregcmd /status in a command prompt on the device; the output shows the join state, device details and SSO state, which tells you whether it’s Microsoft Entra joined, hybrid joined or registered (Troubleshoot devices with dsregcmd (opens in a new tab)).

Find a BitLocker recovery keyDevices & Intune

Device details > Show Recovery Key in Microsoft Entra ID; viewing is audited.

Steps and links

Keys are available for encrypted Windows devices that back up to Microsoft Entra ID: open the device and select Show Recovery Key. The device owner, Cloud Device Administrator, Helpdesk Administrator, Intune Administrator, Security Administrator and Security Reader can view them, and each view is logged in the audit log KeyManagement category (View or copy BitLocker keys (opens in a new tab)).

Read a device’s local admin password (Windows LAPS)Devices & Intune

Cloud Device Administrator or Intune Administrator can read it; Helpdesk and Security roles see metadata only.

Steps and links

Reading the password needs the deviceLocalCredentials/password/read action, which Cloud Device Administrator and Intune Administrator have; Helpdesk Administrator, Security Administrator and Security Reader get metadata only. Through Microsoft Graph the password comes back Base64-encoded (Recovering the local administrator password (opens in a new tab)).

Autopilot enrollment failedDevices & Intune

Turn on the ESP diagnostics page, read the Autopilot event log, then match the error code.

Steps and links

Set the Enrollment Status Page to show the diagnostics page, read the ModernDeployment-Diagnostics-Provider Autopilot log, and check the error code against Microsoft’s FAQ (Windows Autopilot troubleshooting FAQ (opens in a new tab)).

Clean up stale devices safelyDevices & Intune

Export devices by activity timestamp, disable first, delete later, and back up BitLocker keys first.

Steps and links

Microsoft’s routine is to list devices with the activity timestamp, disable the stale ones, wait a grace period, then delete. Deleting can’t be undone and removes BitLocker keys, so back them up first (Clean up stale devices (opens in a new tab)).

A user can't enroll a device: check enrollment restrictionsDevices & Intune

Enrollment fails because a platform, ownership, OS version, or per-user device limit restriction is blocking the user. Check those policies before chasing Autopilot or join errors.

Steps and links

Use this when a user cannot enroll a device in Intune and you have not yet confirmed whether an enrollment restriction is the cause. This is not an Autopilot ESP or event-log failure (Autopilot enrollment failed), not a dsregcmd join-state check (Check a device’s join state with dsregcmd /status), and not a device that already enrolled but is noncompliant (Find out why a device is not compliant). For the full policy design, see Intune Enrollment Restrictions: Platform, Ownership and Device Limits.

Enrollment restrictions are not security features; a compromised device can misrepresent itself. They are a best-effort barrier for non-malicious users (Overview of enrollment restrictions (opens in a new tab)).

You'll need: Intune Administrator (the device-limit article also names this role Intune Service Administrator; it is the same built-in Microsoft Entra role) to create, edit, or reprioritize restrictions. Other built-in Intune roles have read-only access (Create device platform restrictions (opens in a new tab); Create device limit restrictions (opens in a new tab)).

Steps

  1. Sign in to the Microsoft Intune admin center and go to Devices. Under Device onboarding, select Enrollment. Under Enrollment options, select Device platform restriction. Open the tab for the platform the user is enrolling (Windows, Android, macOS, iOS/iPadOS, and so on) (Create device platform restrictions (opens in a new tab)).
  2. Review the default policy and any higher-priority assigned policies. Intune applies the default policy to all user and userless enrollments until you assign a higher-priority policy. When a user is in more than one group, only the restriction with the highest priority applies (1 is highest) and the others are disregarded (Create device platform restrictions (opens in a new tab); Overview of enrollment restrictions (opens in a new tab)). Check:
    • Platform or MDM: Allow or Block for that platform.
    • Personally-owned: whether personal devices are allowed to enroll.
    • Device manufacturer (Android) and the Allow min/max OS version range, if set.
  3. Check device limit restrictions. In the Intune admin center go to Devices > Enrollment, select the Windows, macOS, Apple mobile, or Android tab, then select Device limit restriction (Create device limit restrictions (opens in a new tab)). Device limits can be 1 to 15. Limits count Intune-managed devices that have contacted Intune in the last 90 days and are not in a registration-pending state for more than 24 hours (and not in the other excluded states listed in that article). BYOD users who reach the limit see a message during enrollment and must unenroll an existing device, or you can raise the limit.
  4. Confirm the restriction that should apply is actually assigned. If you do not assign a restriction to at least one group, it has no effect. Unassigned custom restrictions never override the default (Create device platform restrictions (opens in a new tab)).
  5. Remember that user, group, and filter assignment updates between Microsoft Entra ID and Intune typically take up to about 15 minutes and are not instant. Wait several minutes after adding a user to a group before retrying enrollment (Create device platform restrictions (opens in a new tab)). Edits apply to new enrollments only; they do not change devices that are already enrolled.

If that didn't work

Microsoft Learn sources

Retire or wipe a lost, stolen, or departing deviceDevices & Intune

For a lost or stolen device, wipe it (factory reset). To remove company data from a BYOD or departing-user device and leave personal data, retire it instead.

Steps and links

Data-loss warning: Wipe factory-resets the device and removes all personal and organizational data, apps, and configurations. Use it when a device is lost or stolen, is being securely erased, or must be reset to default settings. Retire removes company data, managed apps, settings, and profiles and unenrolls the device, but keeps the user's personal content. Use retire for personally owned devices or when you are handing a device out of organizational control (Wipe devices (opens in a new tab); Device action: retire (opens in a new tab)).

This is a targeted remote action for one device, not bulk stale-device cleanup (Clean up stale devices safely).

Before you retire or delete the Intune object for a Microsoft Entra joined device that is protected by BitLocker, back up the BitLocker recovery key (and local administrator credentials if you will need them). Intune triggers a sync that removes key protectors and suspends BitLocker on the OS volume as a safeguard (Device action: retire (opens in a new tab)). Viewing a BitLocker key is covered in Find a BitLocker recovery key.

Both actions run the next time the device checks in with Intune. Until then, the device might still appear in the admin center (Device action: retire (opens in a new tab)).

You'll need: at least Help Desk Operator, School Administrator, or a custom role that includes Remote tasks/Wipe or Remote tasks/Retire plus visibility on managed devices (Wipe devices (opens in a new tab); Device action: retire (opens in a new tab)). A tenant can submit up to 500 Wipe actions and 1,000 Retire actions per day.

Steps

  1. Decide wipe versus retire:
    • Wipe — factory reset; all personal and company data is removed. Commonly used when the device is lost or stolen, being retired or repurposed, or must be securely erased (Wipe devices (opens in a new tab)).
    • Retire — company data, managed apps, and MDM profiles are removed and the device is unenrolled; personal data stays. The Learn article describes this as the action for personally owned devices or when transitioning a device out of organizational control (Device action: retire (opens in a new tab)).
  2. Back up anything you may not be able to recover after the action, especially the BitLocker recovery key for a Microsoft Entra joined Windows device.
  3. Sign in to the Microsoft Intune admin center, go to Devices > All devices, and select the device (Wipe devices (opens in a new tab); Device action: retire (opens in a new tab)).
  4. At the top of the device overview pane, in the row of action icons, select Remove data, then Wipe or Retire.
  5. If you chose Wipe, review the platform options before you confirm:
    • For lost or stolen Windows devices that must not be recoverable, Wipe device, and continue to wipe even if device loses power overwrites free space and continues after a power loss. Use this only on corporate-owned devices where full data destruction is required and recovery procedures are in place: this option can prevent some devices from starting up again (Wipe devices (opens in a new tab)).
    • Wipe device, but keep enrollment state and associated user account resets the device but preserves user data, user accounts, and important settings, and the device remains enrolled. That is not the option to use for a lost or stolen device.
    • Android Enterprise corporate-owned devices preserve eSIMs by default; use the option to remove eSIMs if you need to. To choose whether to remove eSIMs during a single-device wipe, the wipe article says to use the new device view (Devices > All devices, set Preview new device view to On, then select the device).
    • macOS wipes may prompt for a 6-digit Recovery PIN on devices that do not have the T2 chip (typically 2018 or earlier, or macOS 10.14 or earlier). Record the PIN and give it to the device owner; it is not visible after the wipe completes.
  6. Confirm the action (Wipe or Yes for retire). Wait for the device to check in. If you need the record removed immediately, Learn points to the delete device action (opens in a new tab) instead of retire, which is a different action.

If that didn't work

  • The action does not run until the device next checks in. A lost device that never contacts Intune will not complete wipe or retire.
  • On Zebra Android devices, the Wipe action removes only corporate data and does not factory-reset the device; use the Zebra methods listed in the wipe article (Wipe devices (opens in a new tab)).
  • For Android Enterprise fully managed Samsung devices, if Factory Reset is set to Block under device restrictions, a Wipe can cause the device to lose contact with Intune and never finish the factory reset.
  • After retire on a Microsoft Entra joined device, you cannot sign in with a Microsoft Entra account; Learn documents starting the PC in Safe mode and using a local admin account to reach remaining local data (Device action: retire (opens in a new tab)).

Microsoft Learn sources

A user can't join or register a device: check Entra device settings and the device limitDevices & Intune

Joining or registering fails because the user isn't allowed to join, registration is set to None, MFA is required twice, or they've hit the maximum number of devices (default 50). Check Entra ID device settings and the user's device list.

Steps and links

Warning: If you free up the user's quota by deleting old devices, deletion can't be undone and removes details attached to the device, including BitLocker recovery keys. Wipe or retire Intune-managed devices first, and check Clean up stale devices safely before deleting (Delete a Microsoft Entra device (opens in a new tab)).

Use this when Microsoft Entra join or registration fails for one user or a group, and the device itself looks fine. Intune enrollment restrictions are a separate check: A user can't enroll a device.

You'll need: Cloud Device Administrator to change device settings (Intune Administrator and Windows 365 Administrator can read them) (Configure device settings (opens in a new tab)).

Steps

  1. In the Microsoft Entra admin center, go to Entra ID > Devices > Device settings (path as given in the Password Protection deployment article (opens in a new tab)).
  2. Users may join devices to Microsoft Entra ID: is it All, or Selected without this user? It applies only to Microsoft Entra join on Windows 10 or newer, macOS and Linux, not to hybrid join, Azure VMs or Autopilot self-deploying mode (Configure device settings (opens in a new tab)).
  3. Users may register their devices with Microsoft Entra ID: if it's None, personal devices can't register. If Intune or MDM for Microsoft 365 is configured, All is selected and None is unavailable.
  4. Maximum number of devices: the default is 50; you can set up to 100 or Unlimited. It counts Microsoft Entra joined and registered devices (not hybrid joined). A user at the limit can't add a device until one is removed.
  5. Check the user's device count. In All devices, filter by Owner (View and filter your devices (opens in a new tab)), or read-only with Graph: powershell Connect-MgGraph -Scopes "User.Read.All" (Get-MgUserRegisteredDevice -UserId alice@contoso.com -All).Count User.Read.All is listed for reading another user's registered devices (List registeredDevices (opens in a new tab)). Remove devices the user no longer has, or raise the limit.
  6. MFA prompt problems: if you require MFA for device registration with a Conditional Access policy (Register or join devices user action), set Require multifactor authentication to register or join devices to No. Microsoft recommends the Conditional Access approach (Configure device settings (opens in a new tab)).

If that didn't work

Microsoft Learn sources

A new Intune policy or app hasn't reached a device: force a syncDevices & Intune

Devices check in about every 8 hours. Sync the device from the Intune admin center or from the device itself, watch Device sync status, and know when only re-enrollment will fix it.

Steps and links

Use this when you've assigned or changed a policy, profile or app and a device still doesn't have it. Intune notifies online devices when assignments change, but delivery can take from immediately to a few hours, and offline devices only get changes at their next check-in. Maintenance check-ins run about every 8 hours, and a device is allowed only one maintenance sync every 6.5 hours (Policy refresh intervals (opens in a new tab)). A manual sync skips the wait.

You'll need: an Intune role with Remote tasks/Sync devices, for example Help Desk Operator, School Administrator or Endpoint Security Manager (Prerequisites (opens in a new tab)).

Steps

  1. In the Microsoft Intune admin center, go to Devices > All devices and select the device.
  2. In the action icons at the top of the device overview, select Sync, then Yes (Sync a device from the Intune admin center (opens in a new tab)).
  3. On Windows and iOS/iPadOS, track progress on the Device sync status tab. Learn says this needs the Preview new device view toggle turned on (Sync behavior on Windows (opens in a new tab)).
  4. Or sync from the device (Sync enrolled device for Windows (opens in a new tab)):
    • Company Portal: Settings > Sync, or right-click the Company Portal icon and choose Sync this device.
    • Windows Settings: Accounts > Access work or school, select the work account, Info > Sync.
  5. Give it time, then recheck. Intune reports can lag behind what the device has actually applied (Change-based syncs (opens in a new tab)).

If that didn't work

For automation, the Graph syncDevice action needs DeviceManagementManagedDevices.PrivilegedOperations.All and an active Intune license for the tenant (syncDevice action (opens in a new tab)).

Microsoft Learn sources

A guest can’t get in or needs a new email: reset redemptionGuests & sharing

Reset redemption status on the guest’s profile instead of deleting and re-inviting them.

Steps and links

Helpdesk Administrator (least privileged) or User Administrator can open the guest’s profile and use Reset redemption status in the B2B collaboration tile. The user keeps the same object ID and group memberships (Reset guest redemption status (opens in a new tab)).

Guests are prompted for MFA twiceGuests & sharing

Trust MFA from the partner’s tenant in inbound cross-tenant access settings.

Steps and links

For that organization, open inbound trust settings and select Trust multifactor authentication from Microsoft Entra tenants (Inbound trust settings (opens in a new tab)).

Can’t chat with another organization in TeamsGuests & sharing

External access (chat and calls) and guest access (team membership) are separate settings; check both sides.

Steps and links

External access lets your users chat, call and meet with people in other organizations without adding them to your directory; guest access adds them to teams. For a user to use external access, both the organization setting and a user policy must allow it, and the other organization must allow it too (Guest access and external access (opens in a new tab); Manage external meetings and chat (opens in a new tab)).

Limit who can invite guests, and which domains they can inviteGuests & sharing

Tighten External collaboration settings so only specific admins or users can invite guests, and allow or block invitations by domain.

Steps and links

Use this to change the tenant B2B invitation policy: who may send guest invitations, and which domains may receive them. This is not a redemption problem for one guest (A guest can’t get in or needs a new email: reset redemption), not SharePoint or OneDrive Anyone-link defaults (Limit SharePoint and OneDrive Anyone links), and not Teams external access (Can’t chat with another organization in Teams). The allow/block list is also independent of the OneDrive and SharePoint Online domain lists (Allow or block invitations (opens in a new tab)).

You'll need: a role that can update External collaboration settings, such as Global Administrator or External Identity Provider Administrator (lesser-privileged roles may be available for individual settings when you use Microsoft Graph) (Configure external collaboration settings (opens in a new tab)). The allow/block list steps sign you in as a Global Administrator.

Steps

  1. Sign in to the Microsoft Entra admin center and go to Entra ID > External Identities > External collaboration settings (Configure external collaboration settings (opens in a new tab)).
  2. Under Guest invite settings, choose who can send invitations:
    • Anyone in the organization can invite guest users including guests and non-admins (most inclusive)
    • Member users and users assigned to specific admin roles can invite guest users including guests with member permissions
    • Only users assigned to specific admin roles can invite guest users — only users with the User Administrator or Guest Inviter role can invite guests
    • No one in the organization can invite guest users including admins (most restrictive)
  3. If you chose Only users assigned to specific admin roles can invite guest users, assign the Guest Inviter role to the people who should still be able to invite, instead of giving them a higher-privileged administrator role (Configure external collaboration settings (opens in a new tab)).
  4. Under Collaboration restrictions, keep the default Allow invitations to be sent to any domain (most inclusive), or set a list. You can create either an allow list or a block list, not both. The list is enforced from the time you save it; it does not apply to guests who have already redeemed an invitation, but a pending invitation to a now-blocked domain fails when the user tries to redeem it. Both this list and cross-tenant access settings are checked at invitation time (Allow or block invitations (opens in a new tab)).
    • To block specific domains: select Deny invitations to the specified domains. Under Target domains, enter one domain per line, then select Save.
    • To allow only specific domains: select Allow invitations only to the specified domains (most restrictive). Enter one domain per line, then select Save. Microsoft recommends evaluating this carefully so users do not move file sharing to unsanctioned channels.
  5. Optionally review Guest user access on the same page if you also want to limit what guests can see in the directory (same access as members, the default limited access, or access only to their own profile) (Configure external collaboration settings (opens in a new tab)).

If that didn't work

  • Switching from an allow list to a block list, or the other way around, discards the existing policy configuration. Back up the domain list before you switch (Allow or block invitations (opens in a new tab)).
  • The policy size limit is 25 KB (25,000 characters) for the entire policy, which includes the domain list and other parameters.
  • For B2B collaboration with other Microsoft Entra organizations, also review inbound and outbound cross-tenant access settings (opens in a new tab). If invitations still fail after the domain is allowed here, check those settings and any SharePoint or OneDrive domain restriction, which is a separate list.

Microsoft Learn sources

A guest can't sign in with an email one-time passcodeGuests & sharing

Check that email one-time passcode is on for guests, that the guest is really an OTP user, and that they're signing in through a tenant-specific link or 'Sign in to an organization'. Codes last 30 minutes; sessions 24 hours.

Steps and links

Use this when a B2B guest without a Microsoft Entra or Microsoft account says they never get a code, or the code doesn't let them in. If the guest needs to sign in with a different account or email, use A guest can’t get in or needs a new email: reset redemption instead.

You'll need: at least Authentication Policy Administrator to view or change the email one-time passcode setting (Enable or disable (opens in a new tab)).

Steps

  1. Is email one-time passcode on? Go to Entra ID > External Identities > All identity providers. On the Built-in tab, next to Email one-time passcode, select Configured and check Email one-time passcode for guests is Yes. It's on by default unless someone turned it off. When it's off, guests are prompted to create a Microsoft account instead, and guests who already redeemed with a passcode can't sign in (Enable or disable email one-time passcodes (opens in a new tab)).
  2. Is this guest an OTP user? A guest gets a passcode only if they have no Microsoft Entra account, no Microsoft account, no other password-backed account, and you haven't federated with their identity provider (such as Google). Otherwise they're asked to sign in with that account (When does a guest user get a one-time passcode? (opens in a new tab)).
  3. Are they using a link with your tenant in it? On a general app URL with no tenant context, the guest must choose Sign-in options > Sign in to an organization and type your organization's name. Simpler: send them a tenant-specific link such as https://myapps.microsoft.com/?tenantid=<your tenant ID>. Teams is the exception: guests can sign in from the common endpoint and select a link to send a passcode (Sign-in endpoints (opens in a new tab)).
  4. Use the code promptly. The guest selects Send code, and the passcode is sent to their email address. Each passcode is valid for 30 minutes; after that they need a new one. Sessions expire after 24 hours, so a new passcode on the next day is expected (User experience (opens in a new tab)).

If that didn't work

Microsoft Learn sources

Restore a user deleted in the last 30 daysUsers, licenses & sync

Users > Deleted users > Restore user; after 30 days permanent deletion starts.

Steps and links

Deleted users stay restorable for 30 days with all properties. As at least a User Administrator, go to Entra ID > Users > Deleted users and select Restore user. Licenses come back too, even if none are free. For synced users, on-premises AD is the source of authority: if the user still exists there, the next sync can bring them back (Restore or remove a recently deleted user (opens in a new tab)).

Fix group-based licensing errorsUsers, licenses & sync

Find groups and users in error, fix the cause (not enough licenses, conflicts, usage location), then reprocess.

Steps and links

Group-based licensing records failures on the user. In the Microsoft 365 admin center, open Billing > Licenses, select the product and the Errors & issues tab, fix the cause, then select Reprocess (Resolve group-based licensing problems (opens in a new tab)).

An on-premises change isn’t showing in Microsoft Entra IDUsers, licenses & sync

Check the sync scheduler and errors, then run the object sync troubleshooter for that one user.

Steps and links

Check the Connect Sync scheduler and the sync errors report, then run the troubleshooting task in the Microsoft Entra Connect wizard for that object (Troubleshoot object synchronization (opens in a new tab)).

Soft-match a cloud user to an on-premises accountUsers, licenses & sync

A cloud-only account should become a synced account. Match on UPN or primary SMTP (soft match), or sourceAnchor/immutableId (hard match), and check whether soft match is blocked in the tenant.

Steps and links

Warning: If Microsoft Entra ID takes over the cloud object, every attribute that has a value in on-premises AD overwrites the cloud value. If you use password hash sync (always on with Express installation), the cloud password hash is also overwritten with the on-premises hash, and users must use the on-premises password. Plan this before you sync. Microsoft strongly recommends against synchronizing on-premises accounts with preexisting administrative accounts in Microsoft Entra ID (Configure Microsoft Entra Connect for an existing tenant (opens in a new tab)).

Use this when a cloud-managed user should be taken over by Microsoft Entra Connect or Cloud Sync and become on-premises managed. If the user is already synced and an on-premises change is not appearing, use An on-premises change isn’t showing in Microsoft Entra ID instead.

When a new object arrives from on-premises Active Directory, Microsoft Entra ID tries to match it to an existing cloud object on userPrincipalName, proxyAddresses (the primary SMTP: address only), or sourceAnchor / immutableId. A match on UPN or primary SMTP is a soft match. A match on sourceAnchor is a hard match. Matching is evaluated only for new objects from on-premises AD; changing an already synced object to match these attributes produces an error instead (Configure Microsoft Entra Connect for an existing tenant (opens in a new tab)).

Steps

  1. Confirm the cloud user and the on-premises user represent the same person. Align the on-premises userPrincipalName or the primary SMTP address (SMTP: in proxyAddresses) with the cloud user you intend to match. After a successful soft match, Microsoft Entra ID adds the sourceAnchor to the cloud object so later sync can use a hard match (Configure Microsoft Entra Connect for an existing tenant (opens in a new tab)).
  2. Check whether soft match is blocked in the tenant. Microsoft added BlockSoftMatchEnabled and advises customers to leave soft match disabled unless they need it to take over cloud-only accounts. To read or temporarily change the flag, use Microsoft Graph PowerShell with the OnPremDirectorySynchronization.ReadWrite.All scope and Get-MgDirectoryOnPremiseSynchronization / Update-MgDirectoryOnPremiseSynchronization as shown on that page. Disable the block only for the matching window, then set the flag back to true when matching is finished (Block soft match in Microsoft Entra ID (opens in a new tab)).
  3. If you need a hard match (same sourceAnchor / onPremisesImmutableId) instead of a soft match, also check BlockCloudObjectTakeoverThroughHardMatchEnabled. Beginning 1 July 2026, Microsoft Entra ID adds extra hard-match protections: a hard match can be blocked when the cloud account already has onPremisesObjectIdentifier set, or when the account is assigned or eligible for a privileged Microsoft Entra role. Soft match behavior is unchanged and is still governed by BlockSoftMatchEnabled. These checks apply to both Connect Sync and Cloud Sync (Hard match security protections (opens in a new tab)).
  4. If the cloud user holds a privileged role assignment or eligibility, do not leave that role in place during the match. Confirm the mapping, restore the user first if it is soft-deleted, temporarily remove the privileged assignment or eligibility, rerun synchronization, then reassign the role (Hard match scenarios and recovery paths (opens in a new tab)). Microsoft Entra ID also will not soft-match a cloud user that has an admin role until those roles are removed (Considerations on soft matching user with Admin role (opens in a new tab)).
  5. Trigger a synchronization cycle and confirm the cloud user is now on-premises managed, with the expected onPremisesImmutableId / sourceAnchor, and that sign-in works with the on-premises password if password hash sync is on.

If that didn't work

Microsoft Learn sources

Change a user's sign-in name (UPN) after a name change, without breaking thingsUsers, licenses & sync

Change the username in the Microsoft 365 admin center (or in on-premises AD for synced users), then expect the OneDrive URL and shared links to change and Authenticator, devices and apps to need attention.

Steps and links

Warning: Changing a UPN changes the user's OneDrive URL. Saved links, OneDrive files the user shared with others, and Power Automate or SharePoint workflows and apps that point to the old OneDrive URL stop working, and the user must reshare files (How UPN changes affect the OneDrive URL (opens in a new tab)). If the person only needs a new email address, add an alias instead and leave the UPN alone.

Use this when someone changes their name or moves to a different domain and their sign-in name should match their new primary email address, which Microsoft recommends (Reasons for UPN changes (opens in a new tab)).

You'll need: User Administrator (Before you begin (opens in a new tab)).

Steps

  1. Cloud-only user: Microsoft 365 admin center > Users > Active users, select the user, then on the Account tab select Manage username and email. Edit the Username, pick the right domain in Domains, and select Done. Update the display name under Manage contact information (Change a user's email address (opens in a new tab)).
  2. Synced user: change the UPN in on-premises Active Directory and let it sync. If you change the suffix, add and verify the matching custom domain in Microsoft Entra ID first; if the suffix isn't a verified domain, sync replaces it with .onmicrosoft.com (UPNs in Microsoft Entra ID (opens in a new tab)).
  3. Do it off-peak. UPN changes can take several hours to propagate; Microsoft suggests batches and non-peak hours for many users (Recommendations (opens in a new tab)).
  4. Tell the user what to expect (Plan and troubleshoot UPN changes (opens in a new tab)):
    • On a Microsoft Entra joined PC, wait for the change to sync, then sign in with Other user and the new UPN. The old UPN may still show under Access work or school.
    • In Authenticator, the account may show the old UPN or appear as a new account; if a push doesn't arrive, open the app and select Check for notifications.
    • On Intune-managed mobile devices, the user may need to sign in and register the device again in Company Portal or the Intune app before management and Conditional Access work again (Device re-registration required (opens in a new tab)).
    • OneNote notebooks in OneDrive need to be closed and reopened; the OneDrive sync app switches to the new URL by itself (Sync (opens in a new tab)).
  5. Check apps that use the UPN as the user key. SaaS and line-of-business apps that create profiles just-in-time can create a duplicate profile after the change; apps with automated provisioning are updated for you (SaaS and LoB apps issues (opens in a new tab)).

If that didn't work

Microsoft Learn sources

Restore a Microsoft 365 group or team deleted in the last 30 daysUsers, licenses & sync

Deleted Microsoft 365 groups (and their team, SharePoint site, mailbox and Planner) are kept for 30 days. Restore from Deleted groups in the Microsoft 365 or Entra admin center, then wait for content and mail to come back.

Steps and links

Warning: On the same Deleted groups page, Delete permanently removes the group for good, with no recovery. Select Restore group, not the delete action (View and manage deleted groups (opens in a new tab)).

Use this when a Microsoft 365 group, or the team, SharePoint site or shared mailbox that belongs to it, was deleted. A deleted group is kept for 30 days and that period can't be changed. After 30 days, the group and its content are permanently deleted (Restore a deleted Microsoft 365 group (opens in a new tab)). Restoring brings back the group object, members, email addresses, shared inbox and calendar, SharePoint site and files, OneNote notebook, Planner and Teams.

Distribution groups can't be restored this way. Cloud security groups can, but soft delete for them is in preview (Overview (opens in a new tab)).

You'll need: Groups Administrator (or Global Administrator, Partner Tier 2 Support or Intune Administrator). User Administrator can restore any group except one assigned to the Global Administrator role. Group owners can restore groups they own (Overview (opens in a new tab)).

Steps

  1. Microsoft 365 admin center: expand Groups, select Deleted groups, select the group, then Restore group (Restore a group in the Microsoft 365 admin center (opens in a new tab)). Or Microsoft Entra admin center: Groups > All groups > Deleted groups, then Restore group.
  2. Group owners can do it themselves in Outlook on the web: Groups > Manage groups > Deleted, then Restore (Restore a group in Outlook (opens in a new tab)).
  3. PowerShell (Learn's commands use the Graph beta module; restoring changes data) (Restore using PowerShell (opens in a new tab)): powershell Connect-MgGraph -Scopes "Group.ReadWrite.All" Get-MgBetaDirectoryDeletedGroup # list groups you can still restore Restore-MgBetaDirectoryDeletedItem -DirectoryObjectId '<objectId>' # Id from the list above
  4. Wait. A group with documents, sites or other content can take up to 24 hours to restore fully. Wait at least an hour before emailing the group; earlier messages can bounce with 550 5.1.10 RESOLVER.ADR.RecipientNotFound (Restore a group by using PowerShell, note (opens in a new tab)).
  5. Check it worked: the group shows in Exchange and Planner, and the SharePoint site and files are back (How do you know restoration worked? (opens in a new tab)).

If that didn't work

Microsoft Learn sources

Something not listed? Try Find a Guide, the full error decoder, the scripts library, or the free tools. Want a second pair of eyes? Request a free tenant review.

Is this still accurate?

Spotted something outdated or wrong on this page? Tell us in a sentence. The page address is sent with it.

Reports go to the EntraReady inbox. Please don’t include passwords or tenant secrets.

Want a heads-up when this changes?

Drop your email for occasional Entra change notes and a note when the PDFs get updated.

No spam. Unsubscribe anytime.