def parse_response(response):
    """Parse Office365 Endpoints API results to a list of IP addresses."""
    ip_list = list()
    for entry in response:
        if 'ips' in entry:  # ignore everything that isn't an IP
            ip_list += entry['ips']
    clean_list = (dict.fromkeys(ip_list))  # automatically remove duplicates
    return clean_list