Tuesday, December 14, 2021

Dynamic Distribution Group Changes Coming in 2022

According to a recent article by Tony Redmond, Microsoft is planning to modify the behavior of dynamic distribution groups in Exchange Online next year. The rollout is scheduled to begin in January and finish worldwide by the end of March.

The change is to when the members of dynamic distribution groups are calculated. Currently, dynamic distribution group queries are run every time someone sends a message to the group. While pre-canned queries are quick and cheap to resolve (performance-wise), queries that utilize custom filters can grow to be very complex and their resolution can have a performance impact on the Exchange transport service, introducing delivery delays. By "pre-resolving" dynamic distribution group queries once a day, the performance impact will be negligible and the reliability of the service will be improved.

So what's the downside? Well, by only calculating the membership once a day, your dynamic distribution groups will be a little less dynamic than before. But really, how often does membership in your dynamic distribution groups actually change throughout a single day? At my company, directory changes do occur almost hourly, but the vast majority of those changes occur to newly-created accounts, usually days or even weeks before the employee's first day of work. And even if a a relevant change occurs today, it's going to be less than one day for the associated dynamic distribution group member to be recalculated.

Currently, when you create a new dynamic distribution group or update the filter of an existing group, Exchange Online calculates the membership immediately. However, after this change goes into effect, it will take up to two hours for Exchange Online to calculate the membership of a new group or an existing group whose filters have been updated. This behavior will then be similar to how dynamic groups work in Azure AD.

There's no official word on whether this change will allow Outlook clients to view or expand dynamic distribution group memberships in real time (as they currently do with legacy distribution groups), but that would be a welcome feature, eliminating that "are they or are they not included?" question that I often get from our various executive assistants and members of the communications team.


Friday, February 12, 2021

Quick Hit: Subscribing Existing Members of a Microsoft 365 Group

Took me quite a while to find this solution so I'm just putting it out here so i can find it if I need it again.

The Problem: I re-purposed an O365 group in my Azure AD console, one that was already configured with the dynamic query I needed. Unfortunately, I didn't realize that, by default, members of O365 groups don't receive a copy of emails sent to the group in their personal mailbox. The messages just go to the group mailbox.

After doing some research, I reconfigured the O365 group to automatically "subscribe" new members, but that doesn't change the subscription status of the existing members. A lot of the "solutions" I found on the internet involved enabling the "Subscribe new members" flag and then removing all existing members and then adding them back to the group so that they would be subscribed. While that method probably works, it's not very elegant. There must be another way to accomplish my goal.

Turns out there is, and here it is: 

$group = Get-UnifiedGroup -Identity "Group_Name_or_Email_Address"

# Get list of all members
$members = Get-UnifiedGroupLinks -Identity $group.Name -LinkType Members

# Get list of all subscribers (a-ha!)
$subscribers = Get-UnifiedGroupLinks -Identity $group.Name -LinkType Subscribers

# Subscribe all members not subscribed
foreach ($member in $members) { 
    If ($member.Name -notin $subscribers.Name) {
        Write-Host "Adding $($member.Name)."
        Add-UnifiedGroupLinks -Identity $group.Name -LinkType Subscribers -Links $member.Name
    } else {
        Write-Host "$($member.Name) is already subscribed."
    }
}
# Done!

Almost all of the solutions I found online took the "remove everyone and then add them back again" approach, and maybe that's because that was the only solution at the time. Microsoft is always making changes and introducing new features and functionality, so maybe this PowerShell-based solution was not available until recently. Anyway, it works and it's a pretty simple solution.