Recently i have encountered this error when i was trying to connect to Dynamics CRM 365 online.
I digged in further and found a post where couple of suggestions were mentioned :
Solution : It was to do with my system settings(Time) – my system time was ahead of the server time. which means the request was going to server with a future time.
hence i have changed the time in my system clock to be 5 minutes less. Which indeed worked.
I hope this helps!