My Exchange Admin Center looks nothing like what you show above.
My Exchange Admin Center looks nothing like what you show above.
Hello Mark Topash1, Good day!Thank you for posting to Microsoft Community. We are happy to help you.
Per the description you have share with us, your issue is related to our hybrid team. You can post your issue using this link: Microsoft Exchange Hybrid Management - Microsoft Q&A
So far base on my knowledge you are trying to set up Zoom and you need the EWS URL found in EMC/ECP.
- In the Exchange Admin Center, click servers.
- Click Virtual Directories, then double-click EWS.
3-Click General, and locate the EWS URL.
Once you find the EWS virtual directory, the URL should be displayed there. It typically starts with "https://" and includes the server's name or IP address, followed by "/EWS" or a similar path.
Please note that the exact steps and terminology may differ depending on the version of Exchange you are using. If you're unsure or unable to locate the EWS URL, it may be helpful to consult your organization's IT support or Microsoft's official documentation for your specific Exchange version.
The default URL for EWS is **https:///ews/exchange.asmx(often this may be the same server that OWA is hosted on
If using the above URL with the appropriate domain is not functional, the correct URL can be retrieved in one of 2 ways:
- The Exchange admin can use a PowerShell command on the exchange server
a. Open PowerShell on the Exchange server
b. Type Get-WebServicesVirtualDirectory |Select name, *url* | fl
c. The URL will be provided
Please feel free to let us know if there are any questions or if we got you wrong. We will continue to assist you based on the information you provide. We sincerely appreciate your patience and cooperation. Sincerely,Eben Ezer Tres | Microsoft Community Moderator
Videos
You can use the code below to connect to the EWS on office 365:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.Credentials = new WebCredentials("[email protected]", "password");
service.AutodiscoverUrl("[email protected]", RedirectionUrlValidationCallback);
You need define one callback function for the AutodiscoveryUrl function, like this:
private static bool RedirectionUrlValidationCallback(string redirectionUrl)
{
// The default for the validation callback is to reject the URL.
bool result = false;
Uri redirectionUri = new Uri(redirectionUrl);
// Validate the contents of the redirection URL. In this simple validation
// callback, the redirection URL is considered valid if it is using HTTPS
// to encrypt the authentication credentials.
if (redirectionUri.Scheme == "https")
{
result = true;
}
return result;
}
There appear to have been a few changes in EWS connection to office365 in regards to security, causing Matt's answer to not work for me.
What did work is the following:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1)
{
Credentials = new WebCredentials("user", "password", "domain"),
Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx")
};
Important notes:
AutodiscoverUrldid not complete successfully, it failed to discover the URL every timeusermust be the full email address of the user.domainis the NetBIOS domain name, meaning it is only the domain name. You can find the domain in the Microsoft 365 admin center underSettings -> Domains. The easiest way is to find the fallback domain in the form ofdomain.onmicrosoft.com. Take only thedomainpart.The user must be a Microsoft 365 admin
Any change in one of these parameters caused an
Unauthorizedexception.
EDIT
Basic authentication is no longer supported by Microsoft. Follow this article on how to connect to EWS via OAuth. Worked on the very first try with no issues.