Can the system automatically disable user accounts that haven't accessed the system for a defined period of time (i.e. 3 months)?

Handled by Domain Policy as Azure AD integrated.

Can the system automatically disable user accounts that haven't accessed the system for a defined period of time (i.e. 3 months)?