Share via

Using mail enabled security groups for access to a shared mailbox

Bakker, Ron 0 Reputation points
2025-01-31T08:46:02.76+00:00

I've been searching for a solution, but until now couldn't find one.

We are using an Exchange 2019 environment which include users and shared mailboxes.

Due to the fact that we would like to use IAM software we would like to have access to a shared mailbox for users using mail enable security groups.

When we add a user directly to a shared mailbox, automapping is enabled and users can see the shared mailbox in their Outlook.

As soon as we only use mail enabled security groups, automapping isn't working and users have to add the mailbox manually to their Outlook profile.

The question is, is there a way that we can set automapping with security groups (what isn't working right now) or is there a possibility that we can use a script that can automatically add the shared mailbox to Outlook based on membership of a security group?

Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Exchange | Other
Exchange | Other

A powerful email and collaboration platform developed by Microsoft, designed to support enterprise-level communication and productivity. Miscellaneous topics that do not fit into specific categories.


3 answers

Sort by: Most helpful
  1. Manfred Peer | peerfect.systems 0 Reputation points
    2026-02-04T11:05:09.68+00:00

    Hi Ron

    We have developed a solution that enables the use of Security Groups for Shared Mailboxes, including a working automapping solution for Outlook (Classic), the new Outlook, and OWA. Feel free to PM me for more details.

    Manfred

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Anonymous
    2025-02-03T02:10:31.5366667+00:00

    Hello, @Bakker, Ron,

    Welcome to the Microsoft Q&A platform!

    Yes, automapping isn't currently supported for mail-enabled security groups in Exchange. However, you can use a PowerShell script to automatically add a shared mailbox to Outlook based on group membership.

    Here's a basic example of what the script might look like:

    # Connect to Exchange Online
    Connect-ExchangeOnline -UserPrincipalName <******@domain.com> -ShowProgress $true
    
    # Get the list of users in the security group
    $groupMembers = Get-DistributionGroupMember -Identity "YourSecurityGroup"
    
    # Loop through each member and add the shared mailbox
    foreach ($member in $groupMembers) {
        Add-MailboxPermission -Identity "SharedMailbox" -User $member.PrimarySmtpAddress -AccessRights FullAccess -AutoMapping $false
    }
    

    Test Results: User's image

    This script connects to Exchange Online, retrieves the members of the specified security group, and grants them Full Access to the shared mailbox without automapping. Users will need to manually add the shared mailbox to their Outlook profile, but this can be streamlined with instructions or a separate script.

    Should you need more help on this, you can feel free to post back. 


    If the answer is helpful, please click on “Accept answer” as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.

    Thank you for your support and understanding.

    Best Wishes,

    Alex Zhang

    Was this answer helpful?


  3. Vasil Michev 126.5K Reputation points MVP Volunteer Moderator
    2025-01-31T08:57:37.9+00:00

    No, automapping is only supported when you add the permissions directly, not via group. There have been some improvements on this for the new Outlook client, but that one has no support for on-premises Exchange currently.

    You can certainly script the process to add permissions based on group membership, if automapping is a must. Something like this should work:

    Get-DistributionGroupMember ******@domain.com | ? {$.RecipientTypeDetails -eq "UserMailbox"} | % { Add-MailboxPermission ******@domain.com -User $($.PrimarySmtpAddress) -AccessRights FullAccess }
    

    Was this answer helpful?


Your answer

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