diff --git a/lib/AccountManager/Account.pm b/lib/AccountManager/Account.pm
index 356a4b01be6272d04db6adb4b6bc58aeb2bf5c23..e4b672072711a96163dde957981cf7f1a7e3548e 100644
--- a/lib/AccountManager/Account.pm
+++ b/lib/AccountManager/Account.pm
@@ -49,9 +49,4 @@ sub internal_uid {
     return 'user' . $self->id();
 }
 
-sub associatedSP {
-    my ($self) = @_;
-    return $self->{entityid};
-}
-
 1;
diff --git a/templates/other/accounts.php.tt2 b/templates/other/accounts.php.tt2
index e208c8719b45074eabfbf20105fa559dfca86bd6..9cabafe49047cf3562acce649b271ecacb36c57f 100644
--- a/templates/other/accounts.php.tt2
+++ b/templates/other/accounts.php.tt2
@@ -8,7 +8,7 @@ $validTestAccounts = array (
     [% PROCESS $template scope=account.scope() id=account.id() | trim %]
     '[% account.internal_uid() %]:{SHA256}[% account.password_hash() %]=' => array(
         'internal_uid' => array([% account.internal_uid().quote %]),
-        'associatedSP' => array([% account.associatedSP().quote %]),
+        'associatedSP' => array([% account.entityid().quote %]),
     [% FOREACH attribute IN [ 'cn', 'displayName', 'givenName', 'sn', 'mail', 'schacHomeOrganization', 'schacHomeOrganizationType', 'eduPersonPrincipalName' ] %]
 	[% NEXT UNLESS  attributes.$attribute %]
         '[% attribute %]' => array([% attributes.$attribute.quote("'") %]),