@ConditionalOnMissingBean(name = "multitenancyPrincipalResolutionExecutionPlanConfigurer")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public PrincipalResolutionExecutionPlanConfigurer multitenancyPrincipalResolutionExecutionPlanConfigurer(
            @Qualifier(AttributeRepositoryResolver.BEAN_NAME)
            final AttributeRepositoryResolver attributeRepositoryResolver,
            final ConfigurableApplicationContext applicationContext,
            @Qualifier(AttributeDefinitionStore.BEAN_NAME)
            final AttributeDefinitionStore attributeDefinitionStore,
            @Qualifier(ServicesManager.BEAN_NAME)
            final ServicesManager servicesManager,
            @Qualifier("attributeRepositoryAttributeMerger")
            final AttributeMerger attributeRepositoryAttributeMerger,
            final CasConfigurationProperties casProperties,
            @Qualifier("personDirectoryPrincipalFactory")
            final PrincipalFactory personDirectoryPrincipalFactory,
            @Qualifier(PrincipalResolver.BEAN_NAME_ATTRIBUTE_REPOSITORY)
            final PersonAttributeDao attributeRepository) {
            return plan -> {
                if (casProperties.getMultitenancy().getCore().isEnabled()) {
                    val personDirectory = casProperties.getPersonDirectory();
                    val resolver = PersonDirectoryPrincipalResolver.newPersonDirectoryPrincipalResolver(
                        applicationContext, personDirectoryPrincipalFactory,
                        attributeRepository, attributeRepositoryAttributeMerger,
                        TenantPrincipalResolver.class,
                        servicesManager, attributeDefinitionStore, attributeRepositoryResolver, personDirectory);
                    plan.registerPrincipalResolver(resolver);
                }
            };
        }
This is {@link CasPersonDirectoryConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-person-directory/src/main/java/org/apereo/cas/config/CasPersonDirectoryConfiguration.java