common EWS troubleshooting tools for OSX

Proxy servers or settings can interfere with HTTP(S) traffic.  Firefox has the option to use it's own settings, so even if a URL works there, Safari and other port 80, 443 requests will use proxy settings in Network Settings.  Check there first!

Many times using a Hosts file will help ensure the issue isn't a name resolution problem.  To make manual entries in a Hosts that will override DNS settings ==> Open Terminal in Utilities folder, then paste the following line - need to be administrator and provide password when prompted

sudo "/Applications/TextEdit.app/Contents/MacOS/TextEdit" /etc/hosts

 Next, use the Microsoft Exchange Remote Connectivity Analyzer to test from outside your network.

https://testexchangeconnectivity.com/

Lastly, if you need to verify URLs inside your network and don't have Outlook 2007's Test E-mail Autoconfigure available, then you can use a utility called curl that comes with Mac OSX.

 1) create new shell script called autodiscover.sh copying the code below to automate the curl utility
 2) sample usage:

./autodiscover.sh -e https://autodiscover.contoso.com/autodiscover/autodiscover.xml -a JohnDoe@contoso.com -u contoso\\JDoe

*note - after creating the .sh file on your Mac, you may need to give file, autodiscover.sh the proper permissions.  
For example, run ​chmod 766 autodiscover.sh

**note - the double backslash \\ isn't a typo!  Curl requires an escape character for the domain specifier in the -u option for username​.

#############################################

#! /bin/bash
function print_usage()
{
 echo "Usage: `basename $0` [options]"
 echo "Options:"
 echo "  -e  Autodiscover Endpoint URL"
 echo "  -a  SMTP address of account to perform autodiscover"
 echo "  -u  user ID used when logging into the specified Autodiscover Endpoint"
 exit 2
}
function parse_args()
{
 args=`getopt u:e:a: $*`
 if [ $? != 0 ]; then
  print_usage
 fi
 
 set -- $args
 for i
 do
  case "$1" in
   -e)
    autod_url="$2"; shift
    shift
    ;;
   -a)
    autod_email="$2"; shift
    shift
    ;;
   -u)
    autod_id="$2"; shift
    shift
    ;;
   --)
    shift
    break
    ;;
  esac
 done
 if [ -z "$autod_url" ] || [ -z "$autod_email" ]; then
  print_usage
 fi
}
function generate_autod_request_xml()
{
 _email_address=$1
 autod_xml=""
 autod_xml+='<?xml version="1.0" encoding="UTF-8"?>'
 autod_xml+='<Autodiscover xmlns="https://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006%22%3E'
 autod_xml+='   <Request>'
 autod_xml+='      <EMailAddress>'$_email_address'</EMailAddress>'
 autod_xml+='      <AcceptableResponseSchema>https://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>'
 autod_xml+='   </Request>'
 autod_xml+='</Autodiscover>'
}
parse_args $*
generate_autod_request_xml $autod_email
xml="$autod_xml"
/usr/bin/curl --silent -k --header 'Content-Type: text/xml' --user "$autod_id" "$autod_url" --data "$xml"

##########################################################################