sample code to set credmanager automation.