Giving your helpdesk team Organization Management (or the Entra Exchange Administrator role) just so they can reset an out-of-office or update a mailbox setting is one of the most common over-permissioning mistakes in Exchange. Exchange's Role Based Access Control (RBAC) lets you build a custom role group that contains only the management roles a team needs — and limit which recipients they can touch with a management scope.
This guide was originally written for the Exchange 2016 ECP in 2016. It has been fully rewritten for Exchange Online, Exchange Server Subscription Edition (SE), Exchange 2019 and 2016, using PowerShell that was live-tested in the LAB 365 Microsoft 365 tenant.
How Exchange RBAC Fits Together
Every permission in Exchange is granted through four building blocks:
| Component | What it answers | Example |
|---|---|---|
| Management role | What can be done (a set of cmdlets/parameters) | User Options, Mail Recipients, Reset Password |
| Management scope | Where it can be done (which objects) | Only users with Department -eq 'Sales' |
| Role group | Who gets it (a universal security group) | Helpdesk-Tier1 |
| Role assignment | The link between role, scope and group | User Options-Helpdesk-Tier1 |
- Helpdesk admins added with
Add-RoleGroupMember - Group is a universal security group
User Options– OOF, regional settingsMail Recipients– mailbox properties
New-ManagementScopewith a recipient filter- Only matching mailboxes can be changed
Exchange RBAC vs Entra ID roles: Entra roles such as Exchange Administrator or Exchange Recipient Administrator are tenant-wide and cannot be scoped to a subset of mailboxes. For true least privilege inside Exchange Online, use Exchange role groups (or Entra administrative units, which only cover some Exchange tasks).
Step 1: Connect and Pick the Right Roles
# Exchange Online (ExchangeOnlineManagement v3+)
Connect-ExchangeOnline -UserPrincipalName [email protected]
# Exchange Server SE / 2019 / 2016: open the Exchange Management Shell instead
# List the roles that are typically useful for a helpdesk
Get-ManagementRole | Where-Object { $_.Name -in 'User Options','Mail Recipients','Reset Password','Distribution Groups','View-Only Recipients' } |
Select-Object Name, RoleType, Description
To find which role contains a specific cmdlet (for example Set-MailboxAutoReplyConfiguration), ask Exchange directly:
Get-ManagementRole -Cmdlet Set-MailboxAutoReplyConfiguration | Select-Object Name, RoleType
Live output from the LAB 365 tenant — three roles can run that cmdlet, and User Options is the narrowest:
Name
User Options
MyBaseOptions
Mail Recipients
Note: MyBaseOptions is an end-user role (users managing their own mailbox) and belongs in role assignment policies, not admin role groups.
Step 2: Create a Custom Management Scope (Optional but Recommended)
A scope stops a regional helpdesk from editing executives, service accounts or other regions. Scopes use the same OPATH filter syntax as dynamic distribution groups:
New-ManagementScope -Name "Sales-Mailboxes-Scope" `
-RecipientRestrictionFilter "Department -eq 'Sales' -and RecipientTypeDetails -eq 'UserMailbox'"
In Exchange Server you can also scope by OU using -RecipientRoot "contoso.com/Sales" -RecipientRestrictionFilter {RecipientType -eq 'UserMailbox'}.
Step 3: Create the Role Group
New-RoleGroup -Name "Helpdesk-Sales-Tier1" `
-Roles "User Options", "Mail Recipients" `
-CustomRecipientWriteScope "Sales-Mailboxes-Scope" `
-Members "[email protected]" `
-Description "Tier 1 helpdesk - mailbox settings for Sales users only"
New-RoleGroup automatically creates one role assignment per role and applies the custom write scope to each of them. You can confirm this:
Get-ManagementRoleAssignment -RoleAssignee "Helpdesk-Sales-Tier1" |
Select-Object Name, Role, RecipientWriteScope, CustomRecipientWriteScope
Live output from the LAB 365 tenant:
Name Role CustomRecipientWriteScope RecipientWriteScope
User Options-LAB365-Test-Helpdesk User Options LAB365-Test-HelpdeskScope CustomRecipientScope
Mail Recipients-LAB365-Test-Helpdesk Mail Recipients LAB365-Test-HelpdeskScope CustomRecipientScope
Step 4: Manage Members
# Add / remove helpdesk staff
Add-RoleGroupMember -Identity "Helpdesk-Sales-Tier1" -Member "[email protected]"
Remove-RoleGroupMember -Identity "Helpdesk-Sales-Tier1" -Member "[email protected]" -Confirm:$false
# Review membership
Get-RoleGroupMember -Identity "Helpdesk-Sales-Tier1" | Select-Object Name, PrimarySmtpAddress, RecipientType
Permission changes can take up to 60 minutes to apply in Exchange Online. The admin must sign out and sign back in to the Exchange admin center (or reconnect PowerShell) to see the new cmdlets.
Step 5: Do the Same in the Exchange Admin Center
If you prefer the GUI:
- Exchange Online: open the new Exchange admin center (
admin.exchange.microsoft.com) → Roles → Admin roles → Add role group. - Exchange Server SE / 2019 / 2016: open the EAC (
https://<server>/ecp) → Permissions → Admin roles → +. - Give the group a name, pick a write scope (Default, an OU, or a custom scope), add the roles and members, and save.
When the helpdesk user signs in, the EAC only shows the features their roles allow. Everything else is hidden.
Step 6: Audit All Custom Role Groups
Run this regularly to make sure custom role groups haven't drifted into broad permissions:
function Get-ExchangeRoleGroupAudit {
[CmdletBinding()]
param ()
$highRiskRoles = 'Role Management','Organization Configuration','Mailbox Import Export','ApplicationImpersonation','Mail Recipient Creation','Recipient Policies'
# Built-in groups all report RoleGroupType 'Standard', so match them by name
$builtIn = 'Organization Management','Recipient Management','View-Only Organization Management','Discovery Management',
'Compliance Management','Records Management','Help Desk','Hygiene Management','Security Administrator',
'Security Reader','Server Management','UM Management','Public Folder Management','Delegated Setup',
'TenantAdmins_*','ExchangeServiceAdmins_*','RIM-MailboxAdmins*','ISVMailboxUsers_*','Exchange Online-ApplicationAccount'
Get-RoleGroup | ForEach-Object {
$group = $_
$assignments = Get-ManagementRoleAssignment -RoleAssignee $group.Name -Delegating:$false
$members = Get-RoleGroupMember -Identity $group.Name
[PSCustomObject]@{
RoleGroup = $group.Name
IsCustom = -not ($builtIn | Where-Object { $group.Name -like $_ })
Members = ($members.PrimarySmtpAddress -join '; ')
MemberCount = @($members).Count
Roles = ($assignments.Role -join '; ')
WriteScopes = (($assignments | ForEach-Object { if ($_.CustomRecipientWriteScope) { $_.CustomRecipientWriteScope } else { $_.RecipientWriteScope } }) | Sort-Object -Unique) -join '; '
HighRiskRoles = (($assignments.Role | Where-Object { $_ -in $highRiskRoles }) -join '; ')
}
}
}
Get-ExchangeRoleGroupAudit | Where-Object IsCustom | Export-Csv .\ExchangeRoleGroupAudit.csv -NoTypeInformation
Tip: ApplicationImpersonation is retired in Exchange Online. If you still find it in a custom role group, remove it and move the application to Graph or RBAC for Applications.
Clean Up a Test Role Group
Remove-RoleGroup -Identity "Helpdesk-Sales-Tier1" -BypassSecurityGroupManagerCheck -Confirm:$false
Remove-ManagementScope -Identity "Sales-Mailboxes-Scope" -Confirm:$false