A directory service such as Active Directory, which holds users, groups and other objects, is queried and modified with…