We have a claim rule in our ADFS in order to send a users email address as NameID:-
c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"] => issue(Type = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer, Value = c.Value, ValueType = c.ValueType, Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/format"] = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress");
but we need to be able to examine the email address we read from AD prior to sending this information and if the SMTP domain is an external SMTP domain, such as @Microsoft.com, we need to change the value we send to be the UPN of the user, rather than the email of this user.
Is this even possible?