Forum Discussion

Carlos Gomez's avatar
Carlos Gomez
Brass Contributor
Jun 14, 2017

Create shared mailbox on Hybrid environment - directly on O365 or onpremises then migrate it to O365

Hi,

 

What is the recommended way to create shared mailboxes for a hybrid environment? There are some issues if you create them directly to O365 - https://support.microsoft.com/en-us/help/3129334/users-in-a-hybrid-deployment-can-t-access-a-shared-mailbox-that-was-created-in-exchange-online

 

Create it onpremises then migrate it to O365 is the best practice?

  • Hi Carlos,

     

    If you have an Hybrid, your autodiscover is pointing to your on-premises Exchange. If you create your Mailbox only in Cloud, your AD and Exchange does not have any propreties of that mailbox, that is the issue.

     

  • FishyWishy's avatar
    FishyWishy
    Brass Contributor

    I currently:

     

    1. Create an AD account in a OU that syncs with 365.
    2. On my on-prem exchange, run a powershell command:
      enable-remotemailbox <name> -remoteroutingaddress <mailbox>@<company>.onmicrosoft.com
    3. Once 365 has synced, change the mailbox to shared.
    4. Back in Active Directory I change the attribute msExchRecipientTypeDetails to 34359738368 and msExchRemoteRecipientType to 100
    • Fermin Chavez's avatar
      Fermin Chavez
      Copper Contributor
      Going to try this now. Looks like this is what I do for new users. step 3 and 4 is what I was needing to know for new shared mailboxes.
      • Doyle Spence's avatar
        Doyle Spence
        Copper Contributor
        Hi Fermin
        Did you try this method? Did it work? We're looking to find the same answer. Thanks!
    • Brian Farrugia's avatar
      Brian Farrugia
      Copper Contributor

      Thanks for these instructions.

      Used them when I already had the shared mailbox created on the cloud and synced to on-premises AD.

      Just ran the powershell command in the exchange console, changed the attributes and ran a delta sync cycle.

       

       

  • Kyle Natoli's avatar
    Kyle Natoli
    Copper Contributor

    The method that works for me is:

     

    1) create a user mailbox in OnPrem Exchange

    2) move the user mailbox to office 365

    3) Once move is completed, Convert to shared mailbox (either through EAC or EXO PS using set-mailbox -type shared cmd)

    4) remove license as it is no longer needed for shared mailbox

    5) Assign mailbox delegation to required users

     

    This ensures the mailbox is known between both Exchange onprem and Exchange online realms and doesn't bypass the federation if it's created in the cloud originally. The only Exchange objects that should be recreated in the cloud for a hybrid deployment are DDGs since they can't sync through AAD Connect. Every other EX object should always be created in onprem realm and then synced to EXO via AAD Connect.

    • Eric Morales's avatar
      Eric Morales
      Copper Contributor

      Hello None None, 

       

      I have a couple of question regarding your post. Your method for shared mailboxes in Hybrid environment.

      1. Can I just create the mailbox as shared from the beginning in on-prem exchange server?
      2. How do I create bulk shared mailboxes in the on-prem server?
      3. Can you clarify this, I researched that you need to import the .csv file into EMS, if that is the case, do you know of a way to create a .csv file template to import into EMS?

      Please, let me know at your earliest convenience.

      Thanks,

      EM

      • Kyle Natoli's avatar
        Kyle Natoli
        Copper Contributor

        1. Yes, you can if you have a Exchange 2013 or Exchange 2016 server in your hybrid environment that can create mailboxes straight from the EAC GUI. When you choose new Mailbox, there is an option for Office 365 mailbox, and then choose mailbox type Shared.

         

        You can also use the enable-remote mailbox cmdlet in EMS with the new updates to EX 2013 and 2016 so that it creates a remote shared mailbox right away in the cloud without changing Attributes in AD. refer to https://support.microsoft.com/en-us/help/4133605/cmdlets-to-create-modify-remote-shared-mailbox-in-on-premises-exchange

         

        Exchange 2010 will require either performing the method i mentioned in my previous post or enabling a user remote mailbox from on-prem, changing to shared in EXO, then updating the attributes in AD so that it doesn't change back to a user mailbox. Refer to Draper's response above.

         

        2. Your second question was answered by your third question. Any bulk creation of an Exchange object will require a CSV file fed into EMS or EXO powershell.

         

        3, I don't have a CSV file on hand, but you can find one easily online. Performed a google search and found this. https://gallery.technet.microsoft.com/How-to-Bulk-create-6be6c82f

         

        hope this helps.

         

  • Hi Carlos,

     

    If you still have mailboxes on-premises and would like to have access to your shared mailboxes you should create on-premises and then migrate to Office 365.

    • Carlos Gomez's avatar
      Carlos Gomez
      Brass Contributor

      Hi Nuno,

       

      My mailbox is already migrated to O365 from a while a go, but tonight I tested creating to shared mailboxes. One directly on the cloud and the other on-premises (then migrated), after applying the full access permissions on both for my account only the second one is working (including auto mapping)

       

      I was expecting that for both shared mailboxes to work, but apparently the ones created directly on the cloud have some issues with delegation.

       

      https://support.microsoft.com/en-us/help/3129334/users-in-a-hybrid-deployment-can-t-access-a-shared-mailbox-that-was-created-in-exchange-online

       

      So, I assume that create the shared mailboxes on-premises and then migratem is the best solution even if we have all of our user mailboxes migrated.

       

       

      • NunoAriasSilva's avatar
        NunoAriasSilva
        MVP

        Hi Carlos,

         

        If you have an Hybrid, your autodiscover is pointing to your on-premises Exchange. If you create your Mailbox only in Cloud, your AD and Exchange does not have any propreties of that mailbox, that is the issue.

         

  • Carlos Rotver's avatar
    Carlos Rotver
    Copper Contributor

     

    Hi Carlos,

     

    Other way is creating the Shared Mailbox in On-prem and then migrate it to O365.

     

    This will leave a contact in On-prem (for compatibility for non-migrated users) and the Shared Mailbox will live in O365.  

     

    Regards.

  • Hi

    We have Hybrid.

    We always create user and mailbox on prem  then migrate to O365 .

    We do this both for regular an shared mailbox.

    Never had a problem.

     

    In case regular mailbox is in o365 and needs to be converted to shared mailbox.

    We migrate is to onprem convert to shared with the command and then migrate it back to O365.

    Dont know if there is any other option?

    Would be nice just to convert in O365 !

     

     

    • NunoAriasSilva's avatar
      NunoAriasSilva
      MVP

      Hi David,

       

      You can convert in Office 365 the shared mailbox on the Exchange Admin Center or Exchange Online Powershell. 

       

      You do not need to migrate the mailbox to on-premises.

      • David Lambrecht's avatar
        David Lambrecht
        Brass Contributor

        Hi,

         

        Are you shure that wont give any problems.

         

        We dont have AD write back to onprem...

         

        So i asume just login to exchange online and stet mailbox shared with powershell ? 

         

        Regards,

         

        David

  • CarlosZ665's avatar
    CarlosZ665
    Copper Contributor

    I just tried to create shared mailbox on Office365 go to Exchange in Admin centers tab and it is working well successfully.

Resources