Update sap script to handle un-managed resources