I ran into this issue today, and of course, found out that the error description is BS (connectivity is fine). In my case, this happened after a user UPN was changed. Anyway, what I did was this:
- Go into Office 2016 (any app), Account, Sign out, then sign back in.
- Close OneDrive, open it, try to log in. I got the error, but after 5 or 6 "Try again", it finally let me through.