how-to-synchronize-the-global-address-list-and-use-it-in-outlook

How To Synchronize the Global Address List and Use It in Outlook

Diogo GouveiaProducts and Solutions Leave a Comment

Do you know that satisfying feeling when you start typing in the “To” field of a new email, and the contact information for the person you are looking for conveniently appears right there? Well, you have the Global Address List (GAL) to thank for that.

Where to View the Global Address List

You can think of the Global Address List (GAL) as a big phone book or contact list for everyone in an organization. It holds the names, email addresses, phone numbers, and other details of all the people who work there. Essentially, GAL is a central directory that helps people within an organization find and connect with each other easily. It's a handy tool for looking up someone's contact information when you need to send them an email or give them a call.

To check the Global Address List of your organization in Microsoft Outlook, all you need to do is follow these steps:

  • Launch Microsoft Outlook.
  • Open a New Email window.
    global address list outlook new email
  • Click on “To”.
    global address list outlook to
  • Select the Global Address List or Default Global Address List option.
    global address list outlook default gal
Voilà! It’s as easy as this. Though, note that if your organization has more than one Microsoft Exchange Server, you will only see the GAL for the server you use.

What about GAL Synchronization?

As we just mentioned, the Global Address List you see depends on the server you use within your organization. If there are multiple servers in the organization, the GAL displayed in Outlook is the one associated with the server you are connected to.

Access to multiple GAL is not supported. If you need that, the solution is to go for GAL synchronization and get all the info in a single GAL.

But when would you need that? Here are a couple of scenarios that could call for this:

  • Mergers and Acquisitions – If company A is merging with company B, synchronizing the Global Address Lists of both companies will make life easier for end-users since all contact information will now be common to both structures. You can read more on Exchange Server challenges in M&A scenarios by checking out this blog post.
  • Partners – When a company A partners with company B, there is an inherent increase in communication between both parties. As such, GAL synchronization is the perfect way to guarantee all contact information is conveniently accessible by both sides.
  • Multiple Microsoft Exchange servers – Companies operating within the same group can be connected to their own Exchange environments, which is common, for example, when subsidiaries are spread across different countries. Imagine company group A has several branches across the globe, each with their own IT infrastructure and different Exchange servers. Then if an employee from the European branch is reallocated to the North American branch of the same company group A, GAL synchronization can also come in useful.

So, when facing these types of scenarios, how can a Global Address List be synchronized across other Microsoft Exchange Servers? Is there an uncomplicated way to do this?

      public void Execute(IServiceProvider serviceProvider)
    {
        var tracingService = (ITracingService) serviceProvider.GetService(typeof(ITracingService));
        var context = (IPluginExecutionContext) serviceProvider.GetService(typeof(IPluginExecutionContext));
        var serviceFactory = (IOrganizationServiceFactory) serviceProvider.GetService(typeof(IOrganizationServiceFactory));
        var service = serviceFactory.CreateOrganizationService(context.UserId);
        if (!context.InputParameters.Contains("Target") || !(context.InputParameters["Target"] is Entity))
        {
            return;
        }

        var entity = (Entity) context.InputParameters["Target"];
        var isLoginEnabled = HasLoginEnabled(entity);
        
        if (isLoginEnabled == false)
        {
            return;
        }

        try
        {
            var emailAddress = (string) entity["emailaddress1"];
            var contactsWithSameEmailAddress = GetContactsByEmailAddress(service, entity.Id, emailAddress);
            if (contactsWithSameEmailAddress.Entities.Count > 0)
            {
                var hasLoginEnabled = HasLoginEnabled(contactsWithSameEmailAddress.Entities[0]);
                if (hasLoginEnabled)
                {
                    throw new InvalidPluginExecutionException(OperationStatus.Failed,
                        "User already exists. Try a different email address to register, or login to your existing account.");
                }

                var mergeRequest = new MergeRequest
                {
                    SubordinateId = entity.Id,
                    Target = new EntityReference("contact", contactsWithSameEmailAddress.Entities[0].Id),
                    UpdateContent = GetUpdateContent(entity)
                };
                var _ = (MergeResponse) service.Execute(mergeRequest);
                entity[CustomAttributeName] = true;
                service.Update(entity);
            }
            else
            {
                var domain = emailAddress.Split('@')[1];
                if (_publicDomains.Contains(domain))
                {
                    SendEmailAndDeactivateContact(service, tracingService, entity);
                }
                else
                {
                    var contactsWithSameDomain = GetContactsByDomain(service, entity.Id, domain);
                    if (contactsWithSameDomain.Entities.Count > 0)
                    {
                        entity["parentcustomerid"] = contactsWithSameDomain.Entities[0]["parentcustomerid"];
                        service.Update(entity);
                    }
                    else
                    {
                        SendEmailAndDeactivateContact(service, tracingService, entity);
                    }
                }
            }
        }
        catch (FaultException ex)
        {
            throw new InvalidPluginExecutionException("An error occurred in ContactPostOperationPlugin.", ex);
        }
    }
Close code

GAL Synchronization with CB Exchange Server Sync

CB Exchange Server Sync, as you may already know, is our in-house synchronization tool for Microsoft Exchange Server. Its main purpose is to synchronize any emails, calendars, contacts, notes, tasks, and folders, across several Exchange environments, seamlessly and while running completely in the background.

As is common practice with all our software solutions, we are constantly looking for ways to improve and leverage the power of the products we develop. As a result, on the latest update to the self-hosted version of CB Exchange Server Sync, we released a brand-new add-on called CB GAL Sync! You can probably give a very accurate guess of what this new add-on does, but we will go ahead and explain anyway.

Besides emails, calendars, contacts, notes, tasks, and folders, you can now sync your Global Address List with other Microsoft Exchange environments. This makes CB GAL Sync the ideal solution to solve all the scenarios we just described!

The installation is incredibly easy to set up, so you will not have to spend endless time trying to figure out how to get the integration up and running. Besides the software itself being straightforward, we also have Online Documentation and our Support Portal available for you.

Are you ready to start synchronizing your Global Address List? Get in touch with us and we will take you there!


About the Author

Diogo Gouveia

By Diogo Gouveia

“After completing my studies in the United Kingdom, I joined the Marketing team at Connecting Software to create content on software integration and a variety of other IT topics. If you have any observations or suggestions, please reach out."

Leave a Reply

Your email address will not be published. Required fields are marked *

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

I agree to these terms.