diff --git a/src/Authorization/AbstractAuthorizationService.php b/src/Authorization/AbstractAuthorizationService.php
index a100ab66e82818d4b5ef5074fd15d5ce81ffb949..ffa1255e3734a2b7bd605fda35677bab2427135a 100644
--- a/src/Authorization/AbstractAuthorizationService.php
+++ b/src/Authorization/AbstractAuthorizationService.php
@@ -225,6 +225,7 @@ abstract class AbstractAuthorizationService implements ContextAwareNormalizerInt
                 self::ENTITY_ATTRIBUTE_NAMES_KEY => $attributeNames,
             ];
 
+            $attributeNames = [];
             foreach ($entityNode[AuthorizationConfigDefinition::ENTITY_WRITE_ACCESS_CONFIG_NODE] ?? [] as $attributeName => $attributeAuthorizationExpression) {
                 $roleExpressions[self::toWriteAttributeId($entityShortName, $attributeName)] = $attributeAuthorizationExpression;
                 $attributeNames[] = $attributeName;