SI-2183-Keycloak-Client-Rollen
diff --git a/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/config/auth/JwtAuthenticationTokenFilter.java b/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/config/auth/JwtAuthenticationTokenFilter.java
index ff3cd1e..178ffe6 100644
--- a/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/config/auth/JwtAuthenticationTokenFilter.java
+++ b/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/config/auth/JwtAuthenticationTokenFilter.java
@@ -85,7 +85,9 @@
             token.getResourceAccess().forEach((client, access) -> allRoles.addAll(access.getRoles()));
 
             //Realmroles
-            allRoles.addAll(token.getRealmAccess().getRoles());
+            if (token.getRealmAccess() != null) {
+                allRoles.addAll(token.getRealmAccess().getRoles());
+            }
 
             List<GrantedAuthority> authorities= new ArrayList<>();
             allRoles.forEach( x -> authorities.add(new SimpleGrantedAuthority("ROLE_"+x.toUpperCase())));