Fix bug and unit tests for using sas and service properties