- What is your product version? 10.2
- What is your product type (Angular or MVC)? Angular
- What is product framework type (.net framework or .net core)? .net core
I'm not sure how you want to use it but you can replace https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Zero.Ldap/Ldap/Authentication/LdapAuthenticationSource.cs with your own implementation and modift LDAP integration.
If you only want to retrieve roles fron AD when user logins, then you can do it in your custom
LdapAuthenticationSource.csimplementation. You can add roles to user when LdapAuthenticationSource tries to create a user here https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Zero.Ldap/Ldap/Authentication/LdapAuthenticationSource.cs#L53.
As an alternative, you can create a background worker and periodically update user roles.