Project

O365Synchronizer

O365Synchronizer is a PowerShell module that allows you to synchronize users/contacts to user mailboxes contact list. It can also be used to synchronize users between tenants as contacts or guests.

Stars45
Forks12
Open issues2
PowerShell Gallery downloads2768
Releasev1.0.3
Language: PowerShell Updated: 2026-03-27T08:42:17.0000000+00:00

Curated Examples

Preview personal contact sync

Preview synchronization of selected Microsoft 365 contacts into a mailbox.

This pattern is useful when you want to validate filters and folder targeting before writing contacts.

It is adapted from Examples/02.PersonalContactsSynchronize.ps1.

Example

Import-Module O365Synchronizer

$clientId = '<application-id>'
$tenantId = '<tenant-id>'
$clientSecret = '<client-secret>'

$credential = [pscredential]::new($clientId, (ConvertTo-SecureString $clientSecret -AsPlainText -Force))
Connect-MgGraph -ClientSecretCredential $credential -TenantId $tenantId -NoWelcome

Sync-O365PersonalContact `
    -UserId '[email protected]' `
    -MemberTypes 'Member', 'Contact' `
    -GuidPrefix 'O365Synchronizer' `
    -FolderName 'O365Sync' `
    -WhatIf |
    Format-Table *

What this demonstrates

  • previewing contact synchronization
  • targeting a specific mailbox and folder
  • limiting synchronized object types

Source