Lab · Intermediate · 25 min

Make Exchange Administrator eligible with PIM

Replace a permanent Exchange Administrator assignment with an eligible one that needs MFA and a reason to activate.

What you need

  • A test tenant with Microsoft Entra ID P2 or ID Governance trial
  • Privileged Role Administrator
  • A test admin account

Steps

  1. Open PIM

    Entra admin center, Identity governance, Privileged Identity Management, Microsoft Entra roles, Roles, Exchange Administrator.

  2. Add an eligible assignment

    Add assignments, Eligible, pick the test account, set an end date.

  3. Configure role settings

    Role settings, Edit: maximum activation 8 hours, require MFA and justification on activation.

  4. Activate as the test account

    Sign in as the test account, My roles, Activate, enter a reason.

  5. Confirm in PowerShell

    Reconnect and confirm the role works.

    PowerShell
    Connect-ExchangeOnline -UserPrincipalName testadmin@<tenant>.onmicrosoft.com
    Get-OrganizationConfig | Select-Object Name

Check your result

Before activation Exchange cmdlets are denied; after activation they work until the end time.

Microsoft documentation

Disclaimer. These samples are provided as is, without warranty of any kind. Read and test every script in a non-production tenant before you run it, and run reports before any command that changes or deletes data.