@Override
    public boolean authorizeRequest(final RegisteredServiceAccessStrategyRequest request) throws Throwable {
        val service = request.getApplicationContext().getBean(ScimService.BEAN_NAME, ScimService.class);
        val scimService = service.getScimRequestBuilder(Optional.of(request.getRegisteredService()));
        val response = service.findUser(scimService, request.getPrincipalId());
        val scimGroups = new ArrayList<>();
        if (response.isSuccess() && response.getResource().getTotalResults() > 0) {
            val user = response.getResource().getListedResources().getFirst();
            user.getGroups().forEach(group -> {
                group.getDisplay().ifPresent(scimGroups::add);
                group.getValue().ifPresent(scimGroups::add);
                group.getRef().ifPresent(scimGroups::add);
            });
        }
        val allAttributes = new HashMap<>(request.getAttributes());
        if (!scimGroups.isEmpty()) {
            allAttributes.put("scimGroups", scimGroups);
        }
        return RegisteredServiceAccessStrategyEvaluator.builder()
            .requiredAttributes(this.requiredAttributes)
            .build()
            .apply(request.withAttributes(allAttributes));
    }
Collection of required attributes
for this service to proceed.
support/cas-server-support-scim-core/src/main/java/org/apereo/cas/scim/v2/access/ScimRegisteredServiceAccessStrategy.java