logo
search
Others

How to Automate Shared Mailbox Conversion for Rehired Employees in Microsoft 365

Aamir Naveed AkramAamir Naveed Akram Oct 1, 2026 868 views

Question details

The administrator needs to automate the process of converting a shared mailbox back to a regular user mailbox when an employee is rehired.

Automate Shared Mailbox Conversion After an Employee Rehire
Product
Microsoft Exchange Online
Device & OS
not provided
Scenario
When an employee returns to the company, their previous shared mailbox needs to be converted back to a regular user mailbox so they can receive a Microsoft 365 license and appear in Microsoft Teams.
Observed behavior
Currently, the administrator executes this conversion manually and wants to automate the procedure as part of the identity management or re-onboarding workflow.
Before you start

Ensure you have Exchange Administrator permissions and have installed the Exchange Online PowerShell V3 module to execute the required automation scripts.

Solution 1Recommended

Automate the Conversion Using PowerShell and Exchange Cmdlets

Integrate a PowerShell script into your automated identity management or HR onboarding workflow to trigger the mailbox conversion seamlessly.

By utilizing Exchange Online cmdlets, administrators can fully automate the transition of a shared mailbox to a regular user mailbox. Because exact implementations vary depending on directory synchronization (e.g., Azure AD Connect) and licensing models, the script should be tailored to your specific organizational environment.

1
Connect to Exchange Online

Open an elevated PowerShell session and execute 'Connect-ExchangeOnline' to authenticate with your Microsoft 365 tenant.

2
Run the Conversion Cmdlet

Use the command 'Set-Mailbox -Identity user@yourdomain.com -Type Regular' in your script to change the mailbox from shared to a standard user mailbox.

3
Assign Required Licenses

Integrate Microsoft Graph PowerShell cmdlets (like 'Set-MgUserLicense') into the same script to automatically apply the Microsoft 365 license so the rehired employee can access Outlook and Teams.

4
Embed in Onboarding Workflow

Add this script to your primary identity-management platform or HR automation tools so that it executes automatically when the user's status changes to 'Rehired' or 'Active'.

Automate the Conversion Using PowerShell and Exchange Cmdlets
Hybrid Environments: If you are using an on-premises Exchange hybrid environment, ensure you run the conversion cmdlets on your on-premises Exchange server and allow Azure AD Connect to sync the changes to Microsoft 365.
Free Microsoft Office alternative

Equip Rehired Employees with WPS Office for Instant Productivity

While your IT team automates backend Microsoft 365 licensing and mailbox conversions, you can provide rehired employees with WPS Office as a fast, lightweight, and completely free alternative for document creation.

  1. 1. Visit the Official Site: Go to the official WPS website on the rehired employee's workstation.
  2. 2. Download the Installer: Click the 'Free Download' button to get the lightweight installation package.
  3. 3. Install and Work: Follow the simple installation prompt to start opening and editing Microsoft Office documents right away.
Fully compatible with Microsoft Word, Excel, and PowerPoint file formats.Lightweight installation ensures returning employees can start working immediately without heavy downloads.Familiar tabbed interface eliminates the need for retraining or software onboarding.Comprehensive built-in PDF editing tools for managing contracts and onboarding documents seamlessly.
microsoft office alternative - wps office

Frequently Asked Questions

Will converting a shared mailbox to a user mailbox delete any existing emails?

No, all existing emails, calendar entries, and folders remain entirely intact during the conversion process. Only the mailbox classification type changes.

Why isn't the rehired employee appearing in Microsoft Teams immediately after the script runs?

Licensing changes and directory updates in Microsoft 365 can take several hours to fully propagate. It is common to experience a delay before the user appears in Teams or the Global Address List.

Can I convert the mailbox before assigning a Microsoft 365 license?

Yes, you can convert a shared mailbox to a user mailbox first. However, to access the mailbox and utilize services like Microsoft Teams, the user must be assigned a valid license within 30 days, or the mailbox may become inactive.

How do I test the automation script safely?

It is highly recommended to test your PowerShell script on a dummy shared mailbox in your Microsoft 365 tenant before deploying it to your production identity-management workflow.