If you are trying to access through Outlook online and you get the error 400
Clarify that Outlook 365 online access is NOT possible; It is NOT integrated into Office 365.
The UPM mail service is offered directly from servers at the UPM. To configure it, you can consult the necessary configuration data, as well as some examples of client configuration, at:
UPM Personal Email Configuration
UPM Student Email Configuration
The most direct support is provided by your center's IT staff.
You can also always access it through the UPM Webmail at:
Webmail Personal UPM
UPM Student Webmail
(entering there, your account without @upm.es/@alumnos.upm.es and your password)