Federated Authentication needs the nameidentifier claim in order to proceed with authentication. However, not all the identity providers send this claim (as well as the nameID claim) by default. If the claim is missing, the following error appears in the browser window:
Error: "Unsuccessful login with external provider"
To fix this issue, apply the following transformation to the Federated Authentication configuration files:
<transformations hint="list:AddTransformation"> <transformation name="Name Identifier Claim" type="Sitecore.Owin.Authentication.Services.DefaultTransformation, Sitecore.Owin.Authentication"> <sources hint="raw:AddSource"> <claim name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn" /> </sources> <targets hint="raw:AddTarget"> <claim name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" /> </targets> <keepSource>false</keepSource> </transformation> ...
To fix this issue, configure an identity server to send the name identifier (NameID) claim.
The following is an example for the Active Directory Federation Services (ADFS):