diff --git a/conf/manager.conf.in b/conf/manager.conf.in
index 79723b6d92e6d850f09e68a4e6d636c7290f578e..56272cf30656c14bcfff3ffaa91ec5f6f65becf6 100644
--- a/conf/manager.conf.in
+++ b/conf/manager.conf.in
@@ -47,13 +47,10 @@ name = eduGAIN Access Check
 account_validity_period = 7
 # token validity period, in hours
 tokens_validity_period = 2
-# valid account profiles
-account_profiles = fullset1, limitedset1, generic1, student1, student2, teacher1, teacher2, alumni1, librarywalkin1, employee1, researcher1
 # override contacts defined in metadata if defined
 contacts = john@my.fqdn, sarah@my.fqdn
 
 # service-specific parameters
 [https://my.service.fqdn]
 account_validity_period = 90
-account_profiles = student1, teacher1
 contacts = john@my.fqdn
diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm
index a73c8f5796d717980f308e06af557a2d0056c6f5..96bebd25d09ba3918621ecf5f3330c87338be3fb 100644
--- a/lib/AccountManager/App.pm
+++ b/lib/AccountManager/App.pm
@@ -491,7 +491,9 @@ sub req_complete_challenge {
         $token->secret(),
     );
 
-    my @profiles = split(/, */, $self->{configuration}->{service}->{account_profiles});
+    my @profiles =
+        map { m/([^\/]+).tt2$/ }
+        glob($self->{configuration}->{setup}->{templates_dir} . '/accounts/*.tt2' );
 
     $self->respond(
         template  => 'complete_challenge.tt2.html',