diff --git a/www/saml2/idp/metadata.php b/www/saml2/idp/metadata.php
index 1faf98643ac263811ffd3b1f2dbc6d85fe6f6ec7..d24c73c807fa7a18e7f470e8803a77d22e637967 100644
--- a/www/saml2/idp/metadata.php
+++ b/www/saml2/idp/metadata.php
@@ -59,6 +59,9 @@ try {
 	if (array_key_exists('url', $idpmeta)) {
 		$metaArray['url'] = $idpmeta['url'];
 	}
+	if (array_key_exists('scope', $idpmeta)) {
+		$metaArray['scope'] = $idpmeta['scope'];
+	}
 
 
 	$metaflat = var_export($idpentityid, TRUE) . ' => ' . var_export($metaArray, TRUE) . ',';