How to create a custom Address Lists in Exchange Online


A lot of people are using the Address Book in Outlook or their web mail to find people, but sometimes it can be a hard time filtering on company or departments.
Therefore we will go thru how to create custom Address Lists, and in this case only users with a mailbox that have something typed into the Office-attribute will appear in these lists.

Connect with PowerShell to Exchange Online with MFA

In this case we are working against an Exchange Online with Multi Factor and since Address Lists can’t be managed in the GUI, we have to use PowerShell to do the work.
Before we even fire up PowerShell there is a Role-setting we need to change to be able to use the correct PowerShell cmdlet (AddressList).


Set AddressList Role

  • Open your Exchange Admin Center, go to permissions in the left pane and then admin roles. Open the group you would like to give the AddressList-role to, in my case I choose Organization Management.
  • Add the Address Lists-role and the members that should have access to these permissions.

Changes like these may take a while to activate so have a little patience.


Admin Roles


Once you have the correct permissions you are ready to begin.

  • Open PowerShell as an Administrator.
    PowerShell Administrator
  • Connect to an Exchange Online with MFA.
  • Once you are logged in via PowerShell you can start off by running Get-AddressList to get an overview of your current Address Lists.

Now let’s say that our company name is Cool Company and we have 4 different offices that we want to categorize into address lists:

The first thing we have to do is to create an empty list that is named after our company.


In the next step we will start to create address lists for each office and put them under our company list that we just created.

Repeat this step for each office.

If we run the Get-AddressList-command we can now see our newly created lists:

Now you could believe that we are done by now, but in fact you won’t be able to see anyone in the lists right now.
This is due to the fact that the users need to be edited/updated in their profile since we are running Exchange Online, or else they won’t be visible in your newly created list.
In this case I just go to one of my users Azure-AD profile and enter Gothenburg into his Office-attribute, but you might as well run a PowerShell-command that configures any attribute on all of your users to update them.

User Management

Now if we head over to one of our users, open Outlook and have a look in their Address Book we should now be able to see our changes.
You might have to update the address book in the Outlook-client.

In this case I’ve opened the Gothenburg-list and as you can see our user named Andreas is now visible since the users Office-attribute is set to Gothenburg.

Address Book

If you have any questions regarding the setup please leave a comment down below.



Microsoft Docs – Manage address lists in Exchange Online


Disclaimer: All information on this blog is offered "as is" with no warranty. It is strongly recommended that you verify all information and validate all scripts in isolated test environments before using them in production environments.