diff --git a/lib/SimpleSAML/IdP.php b/lib/SimpleSAML/IdP.php
index 3e78719e15aaf6f542eb5fe3684624a8b327b4f8..c69e29d58ce7c2f333d807d463364504a311b048 100644
--- a/lib/SimpleSAML/IdP.php
+++ b/lib/SimpleSAML/IdP.php
@@ -93,6 +93,16 @@ class SimpleSAML_IdP {
 	}
 
 
+	/**
+	 * Retrieve the ID of this IdP.
+	 *
+	 * @return string  The ID of this IdP.
+	 */
+	public function getId() {
+		return $this->id;
+	}
+
+
 	/**
 	 * Retrieve an IdP by ID.
 	 *