diff --git a/www/saml2/idp/SSOService.php b/www/saml2/idp/SSOService.php
index 42e94456b04cc3bfeaee1d060d1fb14b01449162..4371f94c586e7402f935e3e27e23991bce10aa74 100644
--- a/www/saml2/idp/SSOService.php
+++ b/www/saml2/idp/SSOService.php
@@ -268,6 +268,7 @@ if($needAuth && !$isPassive) {
 				$t = new SimpleSAML_XHTML_Template($config, 'consent.php', 'attributes.php');
 				$t->data['header'] = 'Consent';
 				$t->data['sp_name'] = $sp_name;
+				$t->data['spentityid'] = $spentityid;
 				$t->data['attributes'] = $filteredattributes;
 				$t->data['consenturl'] = SimpleSAML_Utilities::selfURLNoQuery();
 				$t->data['requestid'] = $authId;
diff --git a/www/shib13/idp/SSOService.php b/www/shib13/idp/SSOService.php
index f991cd178ee3fe22e4ba12a696594db6b12ef298..a2e0038c9cad35b2ee0484bf3ba1cb298f44cbb5 100644
--- a/www/shib13/idp/SSOService.php
+++ b/www/shib13/idp/SSOService.php
@@ -187,6 +187,7 @@ if (!$session->isAuthenticated($authority) ) {
 				$t = new SimpleSAML_XHTML_Template($config, 'consent.php', 'attributes.php');
 				$t->data['header'] = 'Consent';
 				$t->data['sp_name'] = $sp_name;
+				$t->data['spentityid'] = $spentityid;
 				$t->data['attributes'] = $filteredattributes;
 				$t->data['consenturl'] = SimpleSAML_Utilities::selfURLNoQuery();
 				$t->data['requestid'] = $authId;