Manage DL Members in OWA Without Allowing DL Creation – A Practical Solution

Today, I'd like to share a real-world workaround that solves a common issue in Microsoft 365: giving users the ability to manage Distribution List (DL) members through Outlook on the Web (OWA) without giving them permission to create or delete DLs. This is a frequent request for organizations focused on strict governance and efficient delegation.

The Challenge

A client recently encountered a problem where a user was unable to manage Distribution Group (DG) members via OWA. After some investigation, we discovered that the MyDistributionGroups role was not included in their role assignment policy.

While enabling this role would solve the immediate issue, it comes with a significant drawback: it also grants the user the ability to create and delete DLs. For organizations with strict governance policies or those that prefer centralized DL creation, this isn't an ideal scenario.

The Goal

Our objective was clear: Allow users to manage existing Distribution Group (DG) members in OWA, but definitively block them from creating or deleting new DLs.

The Solution: Create a Custom Role

The power of Exchange Online's Role-Based Access Control (RBAC) came to the rescue! Here’s how we solved it, step-by-step:

1. Create a Custom Management Role

We started by creating a new custom management role, basing it on the MyDistributionGroups role. This gives us a copy of all its permissions, which we can then modify.

New-ManagementRole -Name “Edit-Existing-DG-Only” -Parent MyDistributionGroups

2. Remove Unwanted Cmdlets

Next, we removed the specific cmdlets that allow for DL creation and deletion from our newly created custom role. This is the core of our solution!

Remove-ManagementRoleEntry Edit-Existing-DG-Only\New-DistributionGroup
Remove-ManagementRoleEntry Edit-Existing-DG-Only\Remove-DistributionGroup

3. Verify the Entries

It’s always good practice to verify your changes. This command helps ensure that the creation and deletion rights are indeed gone from your custom role.

Get-ManagementRoleEntry Edit-Existing-DG-Only*

You should see that New-DistributionGroup and Remove-DistributionGroup are no longer listed for this role.

4. Create a New Role Assignment Policy

Now, we create a new role assignment policy. This policy will include our custom role along with other standard user roles that provide essential OWA functionalities (like managing contact information, retention policies, etc.).

New-RoleAssignmentPolicy -Name “DG-Management-Members-Only” -Roles Edit-Existing-DG-Only, MyContactInformation, MyRetentionPolicies, MyMailSubscriptions, MyTextMessaging, MyVoiceMail, MyDistributionGroupMembership, MyProfileInformation

Note: MyDistributionGroupMembership is important for users to manage their own membership in DGs, which is often desired.

5. Assign the New Policy to a Mailbox

To apply this policy to a specific user, use the Set-Mailbox cmdlet:

Set-Mailbox –Identity john@contoso.com -RoleAssignmentPolicy DG-Management-Members-Only

Remember to replace john@contoso.com with the actual user's email address.

6. Apply to All Mailboxes (If Needed)

For larger deployments, you can apply this new policy to all existing user mailboxes:

Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited | Set-Mailbox -RoleAssignmentPolicy DG-Management-Members-Only

7. Set as the Default Policy (Optional)

To ensure that newly created mailboxes automatically inherit this policy, you can set it as the default role assignment policy for your organization:

Set-RoleAssignmentPolicy -Identity DG-Management-Members-Only -IsDefault

Result: Success!

With these steps implemented, the user can now confidently manage Distribution List members directly from Outlook Web App, just as required, but without any ability to create new groups or delete existing ones.

This is a fantastic example of how granular role customization in Exchange Online can help organizations strike the perfect balance between user flexibility and robust security and governance. It demonstrates the power of PowerShell in tailoring your Microsoft 365 environment to your exact needs.

Comments

Popular posts from this blog

PowerShell Basics for Office 365 Administration (Episode 3)

PowerShell Basics for Office 365 Administration (Episode 4): Conditional Logic and Looping Structures

Unveiling Primary Mailbox Statistics