Symptoms
After you configure the Exchange Web Service URL parameter in Calendar Overlay settings, the CalendarService.ashx file displays an "Invalid EWS URL: <url>" error entry. When this issue occurs, the following error entry and "583ga" or "apmev" event tags are logged in the SharePoint Unified Logging System (ULS) logs:Â
"ExchangeAccess: Preventing an invalid call. ServiceURL='{0}'.",Â
Cause
By default, to help maintain security, no Exchange Web Service URLs are allowed in SharePoint Server.Â
Resolution
Note: Make sure that the blocked URL is safe before you follow these instructions to unblock it.
To fix this issue, farm administrators can run the following PowerShell commands to add the blocked URL to AllowedSafeDomain:Â
add-pssnapin * $f=get-spfarm $f.AllowedSafeDomain.Add("<host>") $f.update() ​​​​​​​For example:Â
$f.AllowedSafeDomain.Add("smtp.office365.com")