Share via

Populate shared mailboxes into a dynamic M365 group

Jacob Derrick 20 Reputation points
Aug 23, 2024, 12:56 PM

Hi, all

Feel like I've been on Google searching this question for hours now...

Does anyone know how to dynamiclly add all organisation shared mailboxes into an M365 group?

So far, the only way I've found to do this is giving all shared mailboxes a custom attribute and then using the below to add them. However this does not automatically pull in future shared mailboxes without manually adding the attribute and defeating the purpose.

(user.extensionAttribute1 -eq "SharedMailbox")

If anyone had the rule syntax for adding all shared mailboxes that would be cool

Thanks

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,956 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 154.4K Reputation points MVP
    Aug 23, 2024, 1:31 PM

    Thats not one of the allowed attributes you can use in Azure:

    https://learn.microsoft.com/en-us/entra/identity/users/groups-dynamic-membership

    However you can create an Exchange DDG that will do this based on RecipientTypeDetails

    https://learn.microsoft.com/en-us/powershell/exchange/recipientfilter-properties?view=exchange-ps&preserve-view=true


1 additional answer

Sort by: Most helpful
  1. MichelDuTrident 0 Reputation points
    Jan 20, 2025, 8:21 AM

    Only on hybrid exchange
    you can add in your AADsync the AD row "msExchRecipientTypeDetails"

    https://learn.microsoft.com/en-us/answers/questions/1306903/how-to-sync-custom-attributes-from-ad-to-aad

    Then create a EntraID Dynamic Group

    (user.extension_############_msExchRecipientTypeDetails -eq 34359738368)

    https://answers.microsoft.com/en-us/msoffice/forum/all/recipient-type-values/7c2620e5-9870-48ba-b5c2-7772c739c651

    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.