diff --git a/templates/accountProfiles/alumni1.tt2 b/templates/accountProfiles/alumni1.tt2
index ee83492b0c024f6c213903142f2d297b86dd0531..fd689b5b24cdb0c328a274384c0c7f75d1db0102 100644
--- a/templates/accountProfiles/alumni1.tt2
+++ b/templates/accountProfiles/alumni1.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Alumni',
 	'comment' => 'Value "member" is not set for eduPersonAffiliation, contrary to current students.',
+  	'internal_uid' => "${account_id}",
   	'uid' => "${account_id}",
 	'eduPersonAffiliation' => ['alum'],
 	'eduPersonScopedAffiliation' => ["alum@${conf.idp_scope}"],
diff --git a/templates/accountProfiles/employee1.tt2 b/templates/accountProfiles/employee1.tt2
index 640a45d9a25f690f7fa6385f0426deab7a14367e..02f4b62d3a3e2b33751778d8d8ae05a89969fe6f 100644
--- a/templates/accountProfiles/employee1.tt2
+++ b/templates/accountProfiles/employee1.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Employee',
 	'comment' => 'There are conflicting definitions of "staff" and "employee" from country to country that make those values particularly unreliable in any international context. However in this example we set both values.',
+  	'internal_uid' => "${account_id}",
   	'uid' => "${account_id}",
 	'eduPersonAffiliation' => ['member','staff','employee'],
 	'eduPersonScopedAffiliation' => ["member@${conf.idp_scope}","staff@${conf.idp_scope}","employee@${conf.idp_scope}"],
diff --git a/templates/accountProfiles/generic1.tt2 b/templates/accountProfiles/generic1.tt2
index 9d2b90c87a6e297578a98f048d5154c17747a998..95c7eb0794404a374b1c5eb48730aa08ee270c8c 100644
--- a/templates/accountProfiles/generic1.tt2
+++ b/templates/accountProfiles/generic1.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Generic',
 	'comment' => 'This account provides a limited set of user attributes (eduPersonPrincipalName, mail and displayName).',
+  	'internal_uid' => "${account_id}",
         'displayName' => '山崎 弘子樫野 陽子',
         'mail' => "forearartian@${conf.idp_scope}",
         'eduPersonPrincipalName' =>"${account_id}@${conf.idp_scope}",
diff --git a/templates/accountProfiles/librarywalkin1.tt2 b/templates/accountProfiles/librarywalkin1.tt2
index 7299dc657715fd390054b7a55011fb376f3420c7..7c4dc4fb03131580f0b74c618b3c23488dd0ca9f 100644
--- a/templates/accountProfiles/librarywalkin1.tt2
+++ b/templates/accountProfiles/librarywalkin1.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Library walk-in',
 	'comment' => 'This term was created to cover the case where physical presence in a library facility grants someone access to electronic resources typically licensed for faculty, staff and students. In recent years the library walk-in provision has been extended to cover other cases such as library users on the campus network, or those using on-campus workstations. Licensed resource providers have often been willing to interpret their contracts with licensees to accept this broader definition of "library-walk-in," though specific terms may vary. For a more direct way of using eduPerson attributes to express library privilege information, see the eduPersonEntitlement value "urn:mace:dir:entitlement:common-lib-terms" as defined in the MACE-Dir Registry of eduPersonEntitlement values <a href="http://middleware.internet2.edu/urn-mace/urn-mace-dir-entitlement.html">http://middleware.internet2.edu/urn-mace/urn-mace-dir-entitlement.html</a>.',
+  	'internal_uid' => "${account_id}",
   	'uid' => "${account_id}",
 	'eduPersonAffiliation' => ['library-walk-in'],
 	'eduPersonScopedAffiliation' => ["library-walk-in@${conf.idp_scope}"],
diff --git a/templates/accountProfiles/researcher1.tt2 b/templates/accountProfiles/researcher1.tt2
index 58b045d2368ae5ac94e2cab207f0f23240a72d41..538028d3db4aaa69dc91efd76c0c9e65610ea759 100644
--- a/templates/accountProfiles/researcher1.tt2
+++ b/templates/accountProfiles/researcher1.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Researcher',
 	'comment' => "No standard value for eduPersonAffiliation can be used to represent a researcher. Therefore you can't differenciate a teacher from a researcher.",
+  	'internal_uid' => "${account_id}",
   	'uid' => "${account_id}",
 	'eduPersonAffiliation' => ['member', 'faculty'],
 	'eduPersonScopedAffiliation' => ["member@${conf.idp_scope}", "faculty@${conf.idp_scope}"],
diff --git a/templates/accountProfiles/student1.tt2 b/templates/accountProfiles/student1.tt2
index c8a0c26cb355b833db95b337d8d6aea472467b5c..aacaa1f4ca1b71045797243116acb1be196362c9 100644
--- a/templates/accountProfiles/student1.tt2
+++ b/templates/accountProfiles/student1.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Student',
 	'comment' => 'An active student has both "member" and "student" values set for eduPersonAffiliation.',
+  	'internal_uid' => "${account_id}",
   	'uid' => "${account_id}",
 	'eduPersonAffiliation' => ['member', 'student'],
 	'eduPersonScopedAffiliation' => ["member@${conf.idp_scope}","student@${conf.idp_scope}"],
diff --git a/templates/accountProfiles/student2.tt2 b/templates/accountProfiles/student2.tt2
index 50c35b9c68dff1c370247062d825caf995967f7f..476c4249a6520870fbb23037041e6a07764bb69d 100644
--- a/templates/accountProfiles/student2.tt2
+++ b/templates/accountProfiles/student2.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Student',
 	'comment' => 'A PhD student, having three values set for eduPersonAffiliation: "member" and "student" and "faculty".',
+  	'internal_uid' => "${account_id}",
   	'uid' => "${account_id}",
 	'eduPersonAffiliation' => ['member', 'student','faculty'],
 	'eduPersonScopedAffiliation' => ["member@${conf.idp_scope}","student@${conf.idp_scope}","faculty@${conf.idp_scope}"],
diff --git a/templates/accountProfiles/teacher1.tt2 b/templates/accountProfiles/teacher1.tt2
index 9c8ff946421fd82e745ef4837642566fc21869ee..79e53fb13b2644b154912b3fa7552c246893093a 100644
--- a/templates/accountProfiles/teacher1.tt2
+++ b/templates/accountProfiles/teacher1.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Teacher',
 	'comment' => 'An active teacher has both "member" and "faculty" values set for eduPersonAffiliation.',
+  	'internal_uid' => "${account_id}",
   	'uid' => "${account_id}",
 	'eduPersonAffiliation' => ['member', 'faculty'],
 	'eduPersonScopedAffiliation' => ["member@${conf.idp_scope}", "faculty@${conf.idp_scope}"],
diff --git a/templates/accountProfiles/teacher2.tt2 b/templates/accountProfiles/teacher2.tt2
index c65add17cda8012ebd0d87e9aed44498e8cd3591..58b76fe18bb756da8fcd8f9f7cf2d37a1567c868 100644
--- a/templates/accountProfiles/teacher2.tt2
+++ b/templates/accountProfiles/teacher2.tt2
@@ -4,6 +4,7 @@
 [% SET account_profile = {
 	'type' => 'Teacher',
 	'comment' => 'This account provides a limited set of user attributes (eduPersonScopedAffiliation and eduPersonTargetedID).',
+  	'internal_uid' => "${account_id}",
 	'eduPersonScopedAffiliation' => ["member@${conf.idp_scope}", "faculty@${conf.idp_scope}"],
 } %]
 
diff --git a/templates/web/validate_token.tt2.html b/templates/web/validate_token.tt2.html
index 463deb77d11d0980ca5e4c6386850b982c1b56f5..3583e2d5813013f0119b784b9f4ca137c223c166 100644
--- a/templates/web/validate_token.tt2.html
+++ b/templates/web/validate_token.tt2.html
@@ -47,7 +47,7 @@
 			<table>
 				<caption>List of user attributes</caption>
             [% FOREACH attribute IN account_profile.pairs -%]
-              [% NEXT IF attribute.key.match('^(type|comment)$') %]
+              [% NEXT IF attribute.key.match('^(type|comment|internal_uid)$') %]
               
               [% IF attribute.value.isa('SCALAR') -%]
 				<tr>