diff --git a/templates/default/consent.php b/templates/default/consent.php
index 8622e73eb61d153bd69d3b9cccdbf41a8131bf8f..c4c1cbc3d59cce545cef518860a0d6ea0abc4eb9 100644
--- a/templates/default/consent.php
+++ b/templates/default/consent.php
@@ -3,12 +3,13 @@
 	
 	$this->includeLanguageFile('consent.php'); 
 	$this->includeInlineTranslation('spname', $this->data['sp_name']);
+	$this->includeInlineTranslation('IDPNAME', $this->data['idp_name']);
 ?>
 
 	<div id="content">
 
 		<p><?php echo htmlspecialchars($this->t('consent_notice')); ?> <strong><?php echo htmlspecialchars($this->t('spname')); ?></strong>.
-		<?php echo htmlspecialchars($this->t('consent_accept')) ?> 
+		<?php echo htmlspecialchars($this->t('consent_accept', true, true, array('IDPNAME' => ''))) ?> 
 		</p>
 
 		<?php if ($this->data['sppp'] !== FALSE) {
@@ -28,7 +29,7 @@
 		<form style="display: inline; margin-left: .5em;" action="<?php echo htmlspecialchars($this->data['noconsent']); ?>" method="GET">
 			<input type="submit" value="<?php echo htmlspecialchars($this->t('no')) ?>" />
 		</form>
-
+		<p>
 
 		<table style="font-size: x-small">
 <?php
diff --git a/www/saml2/idp/SSOService.php b/www/saml2/idp/SSOService.php
index 925dcf9fba57597bb86b99ce65b51ff8403ca2ec..ee6e0a020016f8874902590fd6ee6043192675a6 100644
--- a/www/saml2/idp/SSOService.php
+++ b/www/saml2/idp/SSOService.php
@@ -275,6 +275,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['idp_name'] = (isset($idpmetadata['name']) ? $idpmetadata['name'] : $idpentityid);
 				$t->data['spentityid'] = $spentityid;
 				$t->data['attributes'] = $filteredattributes;
 				$t->data['consenturl'] = SimpleSAML_Utilities::selfURLNoQuery();