フェデレーション認証では、認証を続行するためにnameidentifierクレームが必要ですが、デフォルトでは、すべてのIDプロバイダーがこのクレーム(およびnameIDクレーム)を送信するわけではありません。クレームが欠落している場合、以下のエラーがブラウザー ウィンドウに表示されます:
Error: "Unsuccessful login with external provider"
この問題を解決するには、フェデレーション認証構成ファイルに次の変換を適用してください:
<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> ...
この問題を解決するには、名前識別子(NameID)クレームを送信するようにID サーバーを構成してください。
以下は、Active Directory フェデレーション サービス(ADFS)の例を示したものです: