Adding shared mailbox to users outlook profile using powershell

Mustafa Enver 0 Reputation points
2023-06-23T09:40:39.2+00:00

Hello,

Does anyone know how to add a shared mailbox to an outlook profile using Powershell (or any other method with could be used with intune) and set as default?

Cannot add using AutoMapping (has to be a powershell "Add-MailboxPermission ... -AutoMapping $false") as the shared mailbox needs to be the users primary mailbox and must be added direct to outlook for the Dynamics 365 add-in to work.

Many thanks

Mus

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,172 questions
Outlook | Windows | Classic Outlook for Windows | For business
Windows for business | Windows Server | User experience | PowerShell
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2023-06-23T16:02:09.9933333+00:00

    You cannot add it automatically, as you will need to present credentials for a user with Full Access permissions, whereas the initial profile configuration needs to be via the shared mailbox address. Perhaps something like Power Automate RPA can do it, or other desktop automation tools.

    0 comments No comments

  2. Aholic Liang-MSFT 13,886 Reputation points Microsoft External Staff
    2023-06-26T09:48:47.3633333+00:00

    Hi,

    Yes, as michev said.

    Setting Shared Mailbox as the primary mailbox still requires the login credentials of the user's mailbox, so you cannot automatically add the Shared Mail Box as the primary mailbox for Outlook through PowerShell.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.