POWERSHELL / MIGRATION
FreeIntermediateRead-onlyLow

Export Microsoft 365 migration identity mapping dataset

Creates a normalized migration-focused identity and recipient dataset by correlating Microsoft Graph user data with Exchange Online recipient metadata without duplicating every workload report.

Free browser generation · Review before running · No tenant access by Opselith

What this PowerShell script does

Creates a normalized migration-focused identity and recipient dataset by correlating Microsoft Graph user data with Exchange Online recipient metadata without duplicating every workload report.

Requirements

  • CSV output path - Use a new absolute Windows CSV path. Protect the report because it contains tenant identity metadata. (Required)
  • Include shared mailboxes - Adds Exchange Online shared mailboxes that are not already represented by a Graph user row. (Optional)
  • Include guest users - Include Entra guest identities in the normalized source dataset. (Optional)

Environment

  • Module: Microsoft.Graph.Users + ExchangeOnlineManagement
  • Runtime: 7.6+
  • Permissions: User.Read.All · Read-only recipient visibility
  • Risk: Low
Review before you runSign in to Microsoft Graph and Exchange Online with read-only access. Review the output location and protect the CSV as sensitive organizational data.
OPS / WORKSPACE

Ready to generate

Configure Export Microsoft 365 migration identity mapping dataset in the Builder, review the generated PowerShell and run it in your own environment.

When to use this template

Use this before migration mapping to normalize source identities, aliases, license state and recipient type into one consistent CSV.

Important limitations

Generate the script

  1. Open this template in the PowerShell Builder.
  2. Enter the required values and review the documented permissions and output.
  3. Generate the script, inspect it, then run it in your own PowerShell environment.
Generate Export Microsoft 365 migration identity mapping dataset →
OPS / SCRIPT DETAILS

Script details

Creates a normalized migration-focused identity and recipient dataset by correlating Microsoft Graph user data with Exchange Online recipient metadata without duplicating every workload report. Review these details before generating or running the script.

microsoft-365migrationidentitymappingentraexchangeexport

What it works with

Module: Microsoft.Graph.Authentication · Microsoft.Graph.Users · ExchangeOnlineManagement

Context: PowerShell 7.6+ · Microsoft Graph · Exchange Online

Compatibility: PowerShell 7.6+ is used so current ExchangeOnlineManagement 3.10.x and Microsoft Graph can run in one supported PowerShell 7 session.

Permissions and impact

Permissions: User.Read.All · Read-only recipient visibility

Risk: Low

Execution impact: Read-only. Reads administrative data and does not intentionally change the target environment.

Parameters

  • CSV output path - Use a new absolute Windows CSV path. Protect the report because it contains tenant identity metadata. (Required)
  • Include shared mailboxes - Adds Exchange Online shared mailboxes that are not already represented by a Graph user row. (Optional)
  • Include guest users - Include Entra guest identities in the normalized source dataset. (Optional)

Output

Output: CSV with ObjectId, ObjectType, UserType, DisplayName, UPN, PrimarySmtpAddress, Aliases, AccountEnabled, Licensed, LicenseCount, RecipientType, SourceKey, MappingStatus, Status and Error.

This template is available in the free library and is generated locally in your browser.

Example use

Creates a normalized migration-focused identity and recipient dataset by correlating Microsoft Graph user data with Exchange Online recipient metadata without duplicating every workload report.

Enter the required values in the Builder, review the generated script and confirm the output before running it.

Before you run: Sign in to Microsoft Graph and Exchange Online with read-only access. Review the output location and protect the CSV as sensitive organizational data.

Opselith quality checks

  • Included in the current Opselith PowerShell quality suite
  • Graph and Exchange correlation avoids N+1 recipient lookups
  • Duplicate source addresses are surfaced instead of hidden
  • Partial Exchange failure does not discard Graph inventory
  • CSV formula-injection protection
  • No tenant changes