diff --git a/lib/auth/auth_with_roles.go b/lib/auth/auth_with_roles.go index 16a928b37feda..598c15bbc534c 100644 --- a/lib/auth/auth_with_roles.go +++ b/lib/auth/auth_with_roles.go @@ -4484,7 +4484,7 @@ func (a *ServerWithRoles) GetSAMLIdPSession(ctx context.Context, req types.GetSA } // Users can only fetch their own SAML IdP sessions. if err := a.currentUserAction(session.GetUser()); err != nil { - if err := a.action(apidefaults.Namespace, types.KindDatabase, types.VerbRead); err != nil { + if err := a.action(apidefaults.Namespace, types.KindSAMLIdPSession, types.VerbRead); err != nil { return nil, trace.Wrap(err) } }