Back to Admin Workflows

How to Audit MFA, Guest Access, and Inactive Accounts in Entra ID with PowerShell

Use PowerShell workflows to audit MFA registration, identify inactive users, review guest access, and tighten Entra ID security in one repeatable flow.

Identity is one of the most important layers in modern IT, but it is also one of the easiest to let drift out of control.

Over time, even well-managed tenants accumulate inactive accounts, stale guest users, inconsistent MFA enrollment, and identity data that no longer reflects real-world access needs.

For Microsoft 365 and Entra ID admins, staying on top of this usually means pulling reports, filtering sign-in data, checking MFA registration, and reviewing guest access on a recurring basis. PowerShell can absolutely help with that. The problem is that most admins end up piecing together one-off scripts and modifying them every time the report requirements change.

Why these audits matter

Three of the most useful identity hygiene checks are MFA registration status, inactive user accounts, and guest user access review. Each one points to risk.

If MFA adoption is inconsistent, your attack surface grows. If inactive accounts remain enabled, they become easy targets. If guest users are not reviewed regularly, external access can linger far longer than intended. These issues are common, even in organizations that are otherwise well-administered.

The challenge with manual scripting

Many admins already know how to query Entra ID or export identity data with PowerShell, but operationalizing that into a repeatable workflow is another story.

Someone writes a script. The script works for one specific need. Reporting requirements change. The script gets edited several times. Eventually no one wants to touch it. That is not a great model for recurring identity reporting.

A better approach

A better approach is to create structured, repeatable workflows for the checks you perform regularly. With PSForge, admins can build PowerShell-driven workflows for the most common identity hygiene tasks.

  • Checking MFA registration status
  • Exporting sign-in logs
  • Identifying inactive accounts
  • Reviewing and removing guest users
  • Applying filtered reporting logic

Example Entra ID audit workflow

  1. Check MFA registration status across users
  2. Export filtered sign-in data
  3. Identify accounts with no recent activity
  4. Review guest users and external identities
  5. Generate a report for remediation or follow-up

Final thoughts

If your Entra ID hygiene process currently depends on scattered scripts, spreadsheets, and manual reviews, there is a better way to handle it.

PSForge helps you turn those recurring identity and security tasks into structured PowerShell workflows that are easier to build, easier to reuse, and easier to maintain.

Related guides