Office 365 User Not Listed In Global Address Book

I recently completed a migration for one of my customers to Office 365 and came across a very interesting issue in that one of the users that had been migrated could not be found in the Global Address Book.  After a little bit of research, I managed to find the issue was due to not having any attribute set for the showInAddressBook attribute.

If you find that any of your O365 users are not listed in the Global Address Book, then you need to open Active Directory Users and Computers on one of your Domain Controllers and turn on the Advanced Features:

Find the user, that is having the issue (do not use the search option within Active Directory Users and Computers, as otherwise, you cannot see the attributes of that user!).

Click on the Attribute Editor tab, and find the Attribute showInAddressBook.  In this case, the Value will show as not set.  This shows that the user will not appear in the Global Address Book:

You are probably wondering what value you set…  Open up another user that is listed in the Global Address Book, and find the showInAddressBook attribute and copy the values.  Go back to the user that doesn’t appear in the address book and set the values to be the same.  Wait for Azure Active Directory Sync Tool to run, or force a sync by using the following PowerShell command:

Once that has been synced, we now need to dive into some further PowerShell and checking that the user doesn’t have the HiddenFromAddressListsEnabled set to True on the mailbox.  So we need to connect to Exchange Online PowerShell and perform a query on the user mailbox:

If you are still in a Hybrid Configuration, then you need to run the below commands within the Exchange Management Shell instead of Office 365: