Hello @Hannu Polso and thanks for sharing your solution. Since accepting your own answer is not supported I'm reposting your solution here so that you can accept and rate it. It will ensure that others facing a similar issue can easily find a solution.
We resolved this. It turns out that Email claim was configured wrong. Value must be [http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress]