diff --git a/lib/SimpleSAML/IdP.php b/lib/SimpleSAML/IdP.php
index a68d95b859305a634f2344a238d3361a81839337..efb26dfab96b21b97638e1bb4f242d5f49cd635d 100644
--- a/lib/SimpleSAML/IdP.php
+++ b/lib/SimpleSAML/IdP.php
@@ -2,6 +2,8 @@
 
 namespace SimpleSAML;
 
+use SAML2\Constants as SAML2;
+
 use SimpleSAML\Auth;
 use SimpleSAML\Error;
 use SimpleSAML\Metadata\MetaDataStorageHandler;
@@ -353,7 +355,7 @@ class IdP
     private function authenticate(array &$state)
     {
         if (isset($state['isPassive']) && (bool) $state['isPassive']) {
-            throw new NoPassive('Passive authentication not supported.');
+            throw new NoPassive(SAML2::STATUS_RESPONDER, 'Passive authentication not supported.');
         }
 
         $this->authSource->login($state);