Frappe.session.user returns wrong user account in portal pages

Not sure the problem might be the same, but thought it was worth mentioning;

I have a similar issue occurring where Users who login will randomly be assigned the session of a different User. It’s mind boggling because it is impossible to replicate, as it really seems to occur randomly.

We are using SSO with Azure. We have Helpdesk, Wiki and Insights modules installed besides the base Frappe Framework.