A question was posed in the Exchange IT Pro group of Microsoft’s Office 365 Network:
“Is there any way I can add folders to directory on Outlook for example add a folder “staff” for users to click it and all the staff come up. I have added a picture. Thanks 🙂 By the way I’m using Office 365 Exchange Online.”
The accompanying screen shot showed the People section of Outlook Web App (OWA) and all indications were that the request wanted a way to create a new “Staff” entry under the “Directory” tree on the left-hand side of the screen. By default, this tree includes entries for “All Rooms”, “All Users”, and so on.
My reply was that a new address list would serve the purpose, assuming that you could create a recipient filter to isolate the mail-enabled objects that you wanted to display when the list was accessed. However, a few differences exist in creating an address list for Exchange Online than for Exchange 2013 (documented in pages 345-349 in chapter 7 of “Microsoft Exchange 2013 Inside Out: Mailbox and High Availability”), so here’s a brief overview of what needs to be done.
First, like everything else in Exchange, RBAC controls access to the cmdlets that control the ability to work with address lists. As it happens, the “Address Lists” role is not assigned to any administrative role group, so the first task is to assign the role to a suitable role group. Follow these steps:
- Open the Exchange Administration Center (EAC) in Office 365
- Click “permissions”
- Click “admin roles”
- Select the role group that you want to amend. I chose “Organization Management” as it is the usual role group used by tenant administrators. Click on the pencil icon to edit the role group.
- Add the “Address Lists” role to the set of roles included in the group and save.
The next step requires PowerShell because EAC does not include an option to allow you to create a new address list. Start PowerShell and connect to Office 365 (use these commands if you don’t already have them in your PowerShell profile). When you connect, RBAC will load all the cmdlets that you are allowed to run into the PowerShell session, including the Address Lists cmdlets.
Next, run the New-AddressList cmdlet to create the new list. You need to provide two pieces of data – the name of the address list as seen by users and the recipient filter used by Exchange to extract items from the directory for display in the list. The example shown below is a very simple filter that extracts user mailboxes whose “StateOrProvince” property is set to “Ireland.”
New-AddressList –Name ‘Ireland Users’ –RecipientFilter {((RecipientType –eq ‘UserMailbox’) –and (StateOrProvince –eq ‘Ireland’))}
Normally, after a new address list is created with on-premises Exchange 2010 or Exchange 2013, you would run the Update-AddressList cmdlet to update the list. You don’t have to do this for Exchange Online (the cmdlet is not available to you), possibly because any update activity that could soak up a lot of system resources is handled behind the scenes.
In fact, there is a twist in how Exchange Online handles pre-existing recipients that should be included in custom address lists. Essentially, because Exchange Online does not make the Update-AddressList cmdlet available to administrators, any pre-existing recipient whose properties match the query for a new address list will not be evaluated for list membership. Evaluation only occurs when a recipient object is created or updated, so if you create a new address list and recipients already exist that should be in the list, you have to update those recipients to “force” Exchange Online to include them in the list. For more information, see Greg Taylor’s EHLO post on the topic.
After a couple of minutes, you should be able to go to OWA, access People, and see the new address list under “Directory” – and better again, if the recipient filter works and the right information has been populated about the objects you want to display, you will see a populated list. The last point is important – address lists can only work if they can find objects according to the filter criteria you specify. If an object is missing some value then it won’t be found. For instance, if a user doesn’t have “Ireland” in their StateOrProvince” property, then they won’t appear in the “Ireland Users” view.
Follow Tony @12Knocksinna






