
Amazon Connect Customer で SAML 認証は成功するのに、特定のユーザーだけログインできない理由を教えてください
困っていた内容
Amazon Connect Customer に SAML 認証でログインしようとすると、特定のユーザーだけ「アクセスが拒否されました。アカウントは認証されましたが、このアプリケーションには登録されていません。」と表示されます。
同じ手順で設定した他のユーザーは問題なくログインできています。
このエラーが表示される原因を教えてください。
どう対応すればいいの?
該当のエラーは、IdP での SAML 認証には成功しているものの、Amazon Connect Customer 内で一致するユーザーが見つからない場合に表示されます。
Troubleshoot SAML with Connect Customer - Amazon Connect Customer
This error means that the user has successfully authenticated using SAML into the AWS SAML login endpoint. However, the user could not be matched/found inside Connect Customer. This usually indicates one of the following:
・The username in Connect Customer doesn't match the RoleSessionName SAML attribute specified in the SAML response returned by the identity provider.
・The user doesn't exist in Connect Customer.
・The user has two separate profiles assigned to them with SSO.
原因の一つとして、IdP 側のユーザー名と Amazon Connect Customer 側のユーザー名が一致していないことが考えられます。
Amazon Connect Customer のユーザー名は、SAML 認証の場合でも大文字と小文字が区別されます。
Configure SAML with IAM for Connect Customer - Amazon Connect Customer
・The user name in Connect Customer must match the RoleSessionName SAML attribute specified in the SAML response returned by the identity provider.
(中略)
・All Connect Customer usernames are case sensitive, even when using SAML.
確認方法
下記コマンドを実行し、Amazon Connect Customer 内のユーザー名が SAML 側のユーザー名(RoleSessionName)と大文字小文字を含めて一致しているかを確認してください。
Troubleshoot SAML with Connect Customer - Amazon Connect Customer
$ aws connect list-users --instance-id [INSTANCE_ID] | grep $username
また、その他の原因としては、ユーザーが Amazon Connect Customer に存在しない場合や、SSO で 2 つの別プロファイルが割り当てられている場合も考えられます。
参考資料
Troubleshoot SAML with Connect Customer - Amazon Connect Customer
Configure SAML with IAM for Connect Customer - Amazon Connect Customer









