How to get services.wsdl for Office 365?

In case you looking for downloading services.wsdl for Office 365 possible that you may find that is  not so straightforward.

In general services.wsdl usually located on URL:

https://server_name/ews/services.wsdl but

How to determine actual server for Office 365 mailbox?

On internet you may find such kind of solution:

— Login to your e-mail account using Outlook Web App (OWA).
— Click Options > See All Options > Account > My Account > Settings for POP, IMAP, and SMTP access.
— In the list of entries, locate the server name

In fact it is not exactly correct, because name you will see there is – which is global alias and does not pointing to actual server:
Continue reading