You can't access the agent files when the directory is retrieved from a synchronization that isn't defined in the admin
java.lang.NullPointerException at org.ametys.plugins.userdirectory.page.UserPage.getProfilesForAnonymousAndAnyConnectedUser(UserPage.java:382)