OWA redirection to Office365


Hello there,

Currently we are having a hybrid mail topology, which means that half of our users' mailboxes reside on Cloud (Exchange On-Line) and half of them reside
locally. We would like to solve the following situation:
When a user accesses OWA and his/her mailbox is on the local Exchange, then he gets redirected to his/her mailbox and everything is fine.
However, when his/hes mailbox resides on cloud, then after a successful local authentication, he gets redirected to Microsoft's website where he gets prompted for
a second time for his/her credentials.

Is it possible for KEMP to bypass the fact that his/her credentials are entered twice ?
Has anyone solved the aforementioned issue either via URL redirection, or via Kemp SSO ?

Thank you.