diff --git a/modules/consent/lib/Auth/Process/Consent.php b/modules/consent/lib/Auth/Process/Consent.php
index e8e2acb30f1d908b02f5118d6b9b9b45a541f479..17b10272582d950962cd2d16cccb47d171d3b987 100644
--- a/modules/consent/lib/Auth/Process/Consent.php
+++ b/modules/consent/lib/Auth/Process/Consent.php
@@ -166,12 +166,13 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt
             $state['Source'] = $idpmeta;
         }
 
+        // Do not use consent if disabled on source entity
+        if ( isset($state['Source']['consent.disable']) && in_array($spEntityId, $state['Source']['consent.disable'])) {
+            SimpleSAML_Logger::debug('Consent: Consent disabled for entity ' . $spEntityId);
+            return;
+        }
+
         if ($this->_store !== null) {
-            // Do not use consent if disabled on source entity 
-            if ( isset($state['Source']['consent.disable']) && in_array($spEntityId, $state['Source']['consent.disable'])) {
-                SimpleSAML_Logger::debug('Consent: Consent disabled for entity ' . $spEntityId);
-                return;
-            }
 
             $source      = $state['Source']['metadata-set'] . '|' . $idpEntityId;
             $destination = $state['Destination']['metadata-set'] . '|' . $spEntityId;