Customize Role-Based Access Control in Office 365
Office 365 includes several default RBAC roles which allow end-users to access ECP and manage their own account properties or advanced mailbox features. A summary of the built-in roles can be found at https://help.outlook.com/en-us/140/Dd207272.aspx. An O365 administrator can also enable and disable certain roles to control what properties and/or features a user can manage. There are several roles, however, that may not provide the desired functionality in Office 365. For example, allowing a federated user to modify their own contact information results in an error since that information is synchronized from on-premise. Similarly, a customer may not want users managing their own distribution groups, or may have policies which forbid connected mailboxes. In these cases, the default user role assignment policy can be customized to remove many of the RBAC roles.
- Logon to O365 and administrator
- On the Admin Overview page, click Manage under Exchange Online
- From ECP, select Roles & Auditing
- Select Default Role Assignment Policy and click Details
- From the list of RBAC roles, uncheck the options/features that are not required and click Save.
In my customer’s case, we unchecked all options except MyBaseOptions. This allowed a user to view their contact information, but not make any changes. In addition, it removed most of the other advanced settings and self-service features. However, we discovered it does not remove the user’s ability to forward incoming email to alternate address. My customer had a strict policy related to automatic email forwarding, so this feature also had to be removed and controlled as a separate management role. We accomplished this by customizing the RBAC roles in O365 using a remote PowerShell session.
- Export MyBaseOptions management role entries for reference:
Get-ManagementRoleEntry MyBaseOptions\* | ConvertTo-Html > C:\MyBaseOptions.htm - Copy the existing MyBaseOptions management role as new MyMailForwarding Role:
New-ManagementRole –Parent MyBaseOptions –Name MyMailForwarding - Copy the existing MyBaseOptions management role as a new MyMailbox role:
New-ManagementRole –Parent MyBaseOptions –Name MyMailbox - Remove all Set-Mailbox parameters (which include mail forwarding permissions) from the new MyMailbox role:
Remove-ManagementRoleEntry MyMailbox\Set-Mailbox - Add Set-Mailbox parameters back to MyMailbox role except those associated with mail forwarding:
Add-ManagementRoleEntry MyMailbox\Set-Mailbox –Parameters AcceptMessagesOnlyFrom, AcceptMessagesOnlyFromDLMembers, AcceptMessagesOnlyFromSendersOrMembers, ErrorAction, ErrorVariable, ExternalOofOptions, GrantSendOnBehalfTo, Identity, Languages, MailTip, MailTipTranslations, OutBuffer, OutVariable, Password, RejectMessagesFrom, RejectMessagesFromDLMembers, RejectMessagesFromSendersOrMembers, RequireSenderAuthenticationEnabled, UserCertificate, UserSMimeCertificate, WarningAction, WarningVariable
Now we modify the Default Role Assignment Policy so that includes only the new MyMailbox role which we’ve customized. It includes all the same settings as MyBaseOption, minus the mail forwarding feature.
- Logon to ECP as administrator account
- Click Roles & Auditing along the left
- Click User Roles along the top
- Select “Default Role Assignment Policy” and click Details
- Uncheck all management roles except MyMailbox and click Save
With the customizations complete and the new policy defined, all O365 users now have only the bare minimum of features approved by the customer. However, we all agreed that there may be exceptions where mail forwarding must be enabled for select accounts. Therefore, we created an new role assignment policy which could selectively be applied to specific mailboxes.
- Logon to ECP as administrator account
- Click Roles & Auditing along the left
- Click User Roles along the top
- Under Role Assignment Policies, click New
- Name the new policy Enable Mail Forwarding and provide a description
- Select only MyBaseOptions role which now contains both MyMailbox and MyMailForwarding
- Click Save
To allow mail forwarding for specific users, the new Enable Mail Forwarding policy can be applied to their mailbox.
- Logon to ECP as administrator account
- Click Users & Groups along the left
- Click Mailboxes along the top
- Locate and select a specific user and click Details
- Expand Mailbox Settings
- Change the role assignment policy to Enable Mail Forwarding
- Click Save
These instructions reflect a real-world scenario in which RBAC roles in O365 had to be customized. They outline the steps to explicitly manage email forwarding, but can be applied to any situation where individual features must be enabled or disabled. RjZ
Comments
- Anonymous
January 01, 2003
Since federated users cannot change their password in O365, I was recently asked if customizing the RBAC roles could also remove the Change Password icon from ECP. (For federated users, it generates an error.) I've tested this scenario and the answer is yes. Set-Mailbox contains a Password parameter that can be removed from the Management Role Assisgnment of MyBaseOptions. However, if these changes are made to the Default Role Assignment Policy, then un-federated users will not be able to change their passwords either. If you must support both federated and un-federated user accounts, it is important to create a new policy which you can apply to users selectively. RjZ