Solved: ADFS and OWIN not working together with Content Approval emails

Vote:
 

Hi,

I'm trying to use Content Approval on a site that uses ADFS and OWIN for authentication.

The problem is that I cannot get mail notifications from Content Approval to work.

I have added an Email claim in ADFS which should be sent to the site but in Startup.Configuration() and only recieve two claims (Name and Roles).
Therefor Content Approval cannot send any email to the users.

Does anyone know if there is a way to fix this or is it a bug in EPiServers OWIN integration?

BR

Erik

Updated:

I got the email notifications to work by adding the Email claim manually like this.
We have configured ADFS to send the email address as the Name claim.
So I took the Name and added it as the Email claim and that way EPiServer picked it up
and started to send emails for Content Approval.

Code:
public class Startup
{
public void Configuration(IAppBuilder app)
{
SecurityTokenValidated = (ctx) =>
{
ctx.AuthenticationTicket.Identity.AddClaim(new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", ctx.AuthenticationTicket.Identity.Name));
//Sync user and the roles to EPiServer in the background
ServiceLocator.Current.GetInstance().SynchronizeAsync(ctx.AuthenticationTicket.Identity, new List() { "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" });

/Erik

#181864
Edited, Sep 01, 2017 8:54
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.