diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 8a893e3..9f3c96e 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -53,7 +53,6 @@
 constexpr const char* ldapEnableInterface = "xyz.openbmc_project.Object.Enable";
 constexpr const char* ldapPrivMapperInterface =
     "xyz.openbmc_project.User.PrivilegeMapper";
-constexpr const char* propertyInterface = "org.freedesktop.DBus.Properties";
 
 struct LDAPRoleMapData
 {
@@ -259,20 +258,18 @@
         return;
     }
 
-    crow::connections::systemBus->async_method_call(
-        [asyncResp](const boost::system::error_code ec) {
-        if (ec)
-        {
-            BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
-            messages::internalError(asyncResp->res);
-            return;
-        }
-        messages::success(asyncResp->res);
-        },
-        "xyz.openbmc_project.User.Manager", dbusObjectPath,
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.User.Attributes", "UserGroups",
-        dbus::utility::DbusVariantType{updatedUserGroups});
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.User.Manager",
+        dbusObjectPath, "xyz.openbmc_project.User.Attributes", "UserGroups",
+        updatedUserGroups, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
+            {
+                BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
+                messages::internalError(asyncResp->res);
+                return;
+            }
+            messages::success(asyncResp->res);
+        });
 }
 
 inline void userErrorMessageHandler(
@@ -426,7 +423,11 @@
                 // If "RemoteGroup" info is provided
                 if (remoteGroup)
                 {
-                    crow::connections::systemBus->async_method_call(
+                    sdbusplus::asio::setProperty(
+                        *crow::connections::systemBus, ldapDbusService,
+                        roleMapObjData[index].first,
+                        "xyz.openbmc_project.User.PrivilegeMapperEntry",
+                        "GroupName", *remoteGroup,
                         [asyncResp, roleMapObjData, serverType, index,
                          remoteGroup](const boost::system::error_code& ec,
                                       const sdbusplus::message_t& msg) {
@@ -451,19 +452,17 @@
                         asyncResp->res
                             .jsonValue[serverType]["RemoteRoleMapping"][index]
                                       ["RemoteGroup"] = *remoteGroup;
-                        },
-                        ldapDbusService, roleMapObjData[index].first,
-                        propertyInterface, "Set",
-                        "xyz.openbmc_project.User.PrivilegeMapperEntry",
-                        "GroupName",
-                        dbus::utility::DbusVariantType(
-                            std::move(*remoteGroup)));
+                        });
                 }
 
                 // If "LocalRole" info is provided
                 if (localRole)
                 {
-                    crow::connections::systemBus->async_method_call(
+                    sdbusplus::asio::setProperty(
+                        *crow::connections::systemBus, ldapDbusService,
+                        roleMapObjData[index].first,
+                        "xyz.openbmc_project.User.PrivilegeMapperEntry",
+                        "Privilege", *localRole,
                         [asyncResp, roleMapObjData, serverType, index,
                          localRole](const boost::system::error_code& ec,
                                     const sdbusplus::message_t& msg) {
@@ -487,13 +486,7 @@
                         asyncResp->res
                             .jsonValue[serverType]["RemoteRoleMapping"][index]
                                       ["LocalRole"] = *localRole;
-                        },
-                        ldapDbusService, roleMapObjData[index].first,
-                        propertyInterface, "Set",
-                        "xyz.openbmc_project.User.PrivilegeMapperEntry",
-                        "Privilege",
-                        dbus::utility::DbusVariantType(
-                            getPrivilegeFromRoleId(std::move(*localRole))));
+                        });
                 }
             }
             // Create a new RoleMapping Object.
@@ -802,7 +795,9 @@
     const std::string& ldapServerElementName,
     const std::string& ldapConfigObject)
 {
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, ldapDbusService, ldapConfigObject,
+        ldapConfigInterface, "LDAPServerURI", serviceAddressList.front(),
         [asyncResp, ldapServerElementName, serviceAddressList](
             const boost::system::error_code& ec, sdbusplus::message_t& msg) {
         if (ec)
@@ -833,10 +828,7 @@
                                             serviceAddressList.front());
         }
         BMCWEB_LOG_DEBUG << "Updated the service address";
-        },
-        ldapDbusService, ldapConfigObject, propertyInterface, "Set",
-        ldapConfigInterface, "LDAPServerURI",
-        dbus::utility::DbusVariantType(serviceAddressList.front()));
+        });
 }
 /**
  * @brief updates the LDAP Bind DN and updates the
@@ -853,9 +845,11 @@
                         const std::string& ldapServerElementName,
                         const std::string& ldapConfigObject)
 {
-    crow::connections::systemBus->async_method_call(
-        [asyncResp, username,
-         ldapServerElementName](const boost::system::error_code& ec) {
+    sdbusplus::asio::setProperty(*crow::connections::systemBus, ldapDbusService,
+                                 ldapConfigObject, ldapConfigInterface,
+                                 "LDAPBindDN", username,
+                                 [asyncResp, username, ldapServerElementName](
+                                     const boost::system::error_code& ec) {
         if (ec)
         {
             BMCWEB_LOG_DEBUG << "Error occurred in updating the username";
@@ -865,10 +859,7 @@
         asyncResp->res.jsonValue[ldapServerElementName]["Authentication"]
                                 ["Username"] = username;
         BMCWEB_LOG_DEBUG << "Updated the username";
-        },
-        ldapDbusService, ldapConfigObject, propertyInterface, "Set",
-        ldapConfigInterface, "LDAPBindDN",
-        dbus::utility::DbusVariantType(username));
+    });
 }
 
 /**
@@ -885,9 +876,11 @@
                         const std::string& ldapServerElementName,
                         const std::string& ldapConfigObject)
 {
-    crow::connections::systemBus->async_method_call(
-        [asyncResp, password,
-         ldapServerElementName](const boost::system::error_code& ec) {
+    sdbusplus::asio::setProperty(*crow::connections::systemBus, ldapDbusService,
+                                 ldapConfigObject, ldapConfigInterface,
+                                 "LDAPBindDNPassword", password,
+                                 [asyncResp, password, ldapServerElementName](
+                                     const boost::system::error_code& ec) {
         if (ec)
         {
             BMCWEB_LOG_DEBUG << "Error occurred in updating the password";
@@ -897,10 +890,7 @@
         asyncResp->res.jsonValue[ldapServerElementName]["Authentication"]
                                 ["Password"] = "";
         BMCWEB_LOG_DEBUG << "Updated the password";
-        },
-        ldapDbusService, ldapConfigObject, propertyInterface, "Set",
-        ldapConfigInterface, "LDAPBindDNPassword",
-        dbus::utility::DbusVariantType(password));
+    });
 }
 
 /**
@@ -918,10 +908,12 @@
                       const std::string& ldapServerElementName,
                       const std::string& ldapConfigObject)
 {
-    crow::connections::systemBus->async_method_call(
-        [asyncResp, baseDNList,
-         ldapServerElementName](const boost::system::error_code& ec,
-                                const sdbusplus::message_t& msg) {
+    sdbusplus::asio::setProperty(*crow::connections::systemBus, ldapDbusService,
+                                 ldapConfigObject, ldapConfigInterface,
+                                 "LDAPBaseDN", baseDNList.front(),
+                                 [asyncResp, baseDNList, ldapServerElementName](
+                                     const boost::system::error_code& ec,
+                                     const sdbusplus::message_t& msg) {
         if (ec)
         {
             BMCWEB_LOG_DEBUG << "Error Occurred in Updating the base DN";
@@ -950,10 +942,7 @@
                 asyncResp->res, "BaseDistinguishedNames", baseDNList.front());
         }
         BMCWEB_LOG_DEBUG << "Updated the base DN";
-        },
-        ldapDbusService, ldapConfigObject, propertyInterface, "Set",
-        ldapConfigInterface, "LDAPBaseDN",
-        dbus::utility::DbusVariantType(baseDNList.front()));
+    });
 }
 /**
  * @brief updates the LDAP user name attribute and updates the
@@ -970,7 +959,9 @@
                             const std::string& ldapServerElementName,
                             const std::string& ldapConfigObject)
 {
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, ldapDbusService, ldapConfigObject,
+        ldapConfigInterface, "UserNameAttribute", userNameAttribute,
         [asyncResp, userNameAttribute,
          ldapServerElementName](const boost::system::error_code& ec) {
         if (ec)
@@ -985,10 +976,7 @@
             serverTypeJson["LDAPService"]["SearchSettings"];
         searchSettingsJson["UsernameAttribute"] = userNameAttribute;
         BMCWEB_LOG_DEBUG << "Updated the user name attr.";
-        },
-        ldapDbusService, ldapConfigObject, propertyInterface, "Set",
-        ldapConfigInterface, "UserNameAttribute",
-        dbus::utility::DbusVariantType(userNameAttribute));
+        });
 }
 /**
  * @brief updates the LDAP group attribute and updates the
@@ -1005,7 +993,9 @@
     const std::string& ldapServerElementName,
     const std::string& ldapConfigObject)
 {
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, ldapDbusService, ldapConfigObject,
+        ldapConfigInterface, "GroupNameAttribute", groupsAttribute,
         [asyncResp, groupsAttribute,
          ldapServerElementName](const boost::system::error_code& ec) {
         if (ec)
@@ -1020,10 +1010,7 @@
             serverTypeJson["LDAPService"]["SearchSettings"];
         searchSettingsJson["GroupsAttribute"] = groupsAttribute;
         BMCWEB_LOG_DEBUG << "Updated the groupname attr";
-        },
-        ldapDbusService, ldapConfigObject, propertyInterface, "Set",
-        ldapConfigInterface, "GroupNameAttribute",
-        dbus::utility::DbusVariantType(groupsAttribute));
+        });
 }
 /**
  * @brief updates the LDAP service enable and updates the
@@ -1039,7 +1026,9 @@
     const std::string& ldapServerElementName,
     const std::string& ldapConfigObject)
 {
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, ldapDbusService, ldapConfigObject,
+        ldapEnableInterface, "Enabled", serviceEnabled,
         [asyncResp, serviceEnabled,
          ldapServerElementName](const boost::system::error_code& ec) {
         if (ec)
@@ -1051,10 +1040,7 @@
         asyncResp->res.jsonValue[ldapServerElementName]["ServiceEnabled"] =
             serviceEnabled;
         BMCWEB_LOG_DEBUG << "Updated Service enable = " << serviceEnabled;
-        },
-        ldapDbusService, ldapConfigObject, propertyInterface, "Set",
-        ldapEnableInterface, "Enabled",
-        dbus::utility::DbusVariantType(serviceEnabled));
+        });
 }
 
 inline void
@@ -1363,21 +1349,19 @@
 
             if (enabled)
             {
-                crow::connections::systemBus->async_method_call(
-                    [asyncResp](const boost::system::error_code& ec) {
-                if (ec)
-                {
-                    BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
-                    messages::internalError(asyncResp->res);
-                    return;
-                }
-                messages::success(asyncResp->res);
-                return;
-                    },
+                sdbusplus::asio::setProperty(
+                    *crow::connections::systemBus,
                     "xyz.openbmc_project.User.Manager", dbusObjectPath,
-                    "org.freedesktop.DBus.Properties", "Set",
                     "xyz.openbmc_project.User.Attributes", "UserEnabled",
-                    dbus::utility::DbusVariantType{*enabled});
+                    *enabled, [asyncResp](const boost::system::error_code& ec) {
+                        if (ec)
+                        {
+                            BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
+                            messages::internalError(asyncResp->res);
+                            return;
+                        }
+                        messages::success(asyncResp->res);
+                    });
             }
 
             if (roleId)
@@ -1390,20 +1374,19 @@
                     return;
                 }
 
-                crow::connections::systemBus->async_method_call(
-                    [asyncResp](const boost::system::error_code& ec) {
-                if (ec)
-                {
-                    BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
-                    messages::internalError(asyncResp->res);
-                    return;
-                }
-                messages::success(asyncResp->res);
-                    },
+                sdbusplus::asio::setProperty(
+                    *crow::connections::systemBus,
                     "xyz.openbmc_project.User.Manager", dbusObjectPath,
-                    "org.freedesktop.DBus.Properties", "Set",
                     "xyz.openbmc_project.User.Attributes", "UserPrivilege",
-                    dbus::utility::DbusVariantType{priv});
+                    priv, [asyncResp](const boost::system::error_code& ec) {
+                        if (ec)
+                        {
+                            BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
+                            messages::internalError(asyncResp->res);
+                            return;
+                        }
+                        messages::success(asyncResp->res);
+                    });
             }
 
             if (locked)
@@ -1418,7 +1401,11 @@
                     return;
                 }
 
-                crow::connections::systemBus->async_method_call(
+                sdbusplus::asio::setProperty(
+                    *crow::connections::systemBus,
+                    "xyz.openbmc_project.User.Manager", dbusObjectPath,
+                    "xyz.openbmc_project.User.Attributes",
+                    "UserLockedForFailedAttempt", *locked,
                     [asyncResp](const boost::system::error_code& ec) {
                 if (ec)
                 {
@@ -1427,13 +1414,7 @@
                     return;
                 }
                 messages::success(asyncResp->res);
-                return;
-                    },
-                    "xyz.openbmc_project.User.Manager", dbusObjectPath,
-                    "org.freedesktop.DBus.Properties", "Set",
-                    "xyz.openbmc_project.User.Attributes",
-                    "UserLockedForFailedAttempt",
-                    dbus::utility::DbusVariantType{*locked});
+                    });
             }
 
             if (accountTypes)
@@ -1603,7 +1584,11 @@
 
     if (minPasswordLength)
     {
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, "xyz.openbmc_project.User.Manager",
+            "/xyz/openbmc_project/user",
+            "xyz.openbmc_project.User.AccountPolicy", "MinPasswordLength",
+            *minPasswordLength,
             [asyncResp](const boost::system::error_code& ec) {
             if (ec)
             {
@@ -1611,11 +1596,7 @@
                 return;
             }
             messages::success(asyncResp->res);
-            },
-            "xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user",
-            "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.User.AccountPolicy", "MinPasswordLength",
-            dbus::utility::DbusVariantType(*minPasswordLength));
+            });
     }
 
     if (maxPasswordLength)
@@ -1651,23 +1632,26 @@
 
     if (unlockTimeout)
     {
-        crow::connections::systemBus->async_method_call(
-            [asyncResp](const boost::system::error_code& ec) {
-            if (ec)
-            {
-                messages::internalError(asyncResp->res);
-                return;
-            }
-            messages::success(asyncResp->res);
-            },
-            "xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user",
-            "org.freedesktop.DBus.Properties", "Set",
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, "xyz.openbmc_project.User.Manager",
+            "/xyz/openbmc_project/user",
             "xyz.openbmc_project.User.AccountPolicy", "AccountUnlockTimeout",
-            dbus::utility::DbusVariantType(*unlockTimeout));
+            *unlockTimeout, [asyncResp](const boost::system::error_code& ec) {
+                if (ec)
+                {
+                    messages::internalError(asyncResp->res);
+                    return;
+                }
+                messages::success(asyncResp->res);
+            });
     }
     if (lockoutThreshold)
     {
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, "xyz.openbmc_project.User.Manager",
+            "/xyz/openbmc_project/user",
+            "xyz.openbmc_project.User.AccountPolicy",
+            "MaxLoginAttemptBeforeLockout", *lockoutThreshold,
             [asyncResp](const boost::system::error_code& ec) {
             if (ec)
             {
@@ -1675,12 +1659,7 @@
                 return;
             }
             messages::success(asyncResp->res);
-            },
-            "xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user",
-            "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.User.AccountPolicy",
-            "MaxLoginAttemptBeforeLockout",
-            dbus::utility::DbusVariantType(*lockoutThreshold));
+            });
     }
 }
 
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index b27a790..30ba4bc 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -750,7 +750,9 @@
             objectPath = "/xyz/openbmc_project/state/chassis0";
         }
 
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, processName, objectPath,
+            interfaceName, destProperty, propertyValue,
             [asyncResp](const boost::system::error_code& ec2,
                         sdbusplus::message_t& sdbusErrMsg) {
             // Use "Set" method to set the property value.
@@ -762,10 +764,7 @@
             }
 
             messages::success(asyncResp->res);
-            },
-            processName, objectPath, "org.freedesktop.DBus.Properties", "Set",
-            interfaceName, destProperty,
-            dbus::utility::DbusVariantType{propertyValue});
+            });
         });
 }
 
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 9aadaea..5fb5aef 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -638,20 +638,18 @@
     const std::string& ifaceId, const std::string& gateway,
     const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-    crow::connections::systemBus->async_method_call(
-        [asyncResp](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            messages::internalError(asyncResp->res);
-            return;
-        }
-        asyncResp->res.result(boost::beast::http::status::no_content);
-        },
-        "xyz.openbmc_project.Network",
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network",
         "/xyz/openbmc_project/network/" + ifaceId,
-        "org.freedesktop.DBus.Properties", "Set",
         "xyz.openbmc_project.Network.EthernetInterface", "DefaultGateway",
-        dbus::utility::DbusVariantType(gateway));
+        gateway, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
+            {
+                messages::internalError(asyncResp->res);
+                return;
+            }
+            asyncResp->res.result(boost::beast::http::status::no_content);
+        });
 }
 /**
  * @brief Creates a static IPv4 entry
@@ -888,17 +886,16 @@
                                            "HostName");
         return;
     }
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network",
+        "/xyz/openbmc_project/network/config",
+        "xyz.openbmc_project.Network.SystemConfiguration", "HostName", hostname,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
             messages::internalError(asyncResp->res);
         }
-        },
-        "xyz.openbmc_project.Network", "/xyz/openbmc_project/network/config",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.SystemConfiguration", "HostName",
-        dbus::utility::DbusVariantType(hostname));
+        });
 }
 
 inline void
@@ -907,17 +904,15 @@
 {
     sdbusplus::message::object_path objPath = "/xyz/openbmc_project/network/" +
                                               ifaceId;
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network", objPath,
+        "xyz.openbmc_project.Network.EthernetInterface", "MTU", mtuSize,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
             messages::internalError(asyncResp->res);
         }
-        },
-        "xyz.openbmc_project.Network", objPath,
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.EthernetInterface", "MTU",
-        std::variant<size_t>(mtuSize));
+        });
 }
 
 inline void
@@ -926,18 +921,16 @@
                           const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     std::vector<std::string> vectorDomainname = {domainname};
-    crow::connections::systemBus->async_method_call(
-        [asyncResp](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            messages::internalError(asyncResp->res);
-        }
-        },
-        "xyz.openbmc_project.Network",
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network",
         "/xyz/openbmc_project/network/" + ifaceId,
-        "org.freedesktop.DBus.Properties", "Set",
         "xyz.openbmc_project.Network.EthernetInterface", "DomainName",
-        dbus::utility::DbusVariantType(vectorDomainname));
+        vectorDomainname, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
+            {
+                messages::internalError(asyncResp->res);
+            }
+        });
 }
 
 inline bool isHostnameValid(const std::string& hostname)
@@ -1007,9 +1000,12 @@
     static constexpr std::string_view dbusNotAllowedError =
         "xyz.openbmc_project.Common.Error.NotAllowed";
 
-    crow::connections::systemBus->async_method_call(
-        [asyncResp, macAddress](const boost::system::error_code& ec,
-                                const sdbusplus::message_t& msg) {
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network",
+        "/xyz/openbmc_project/network/" + ifaceId,
+        "xyz.openbmc_project.Network.MACAddress", "MACAddress", macAddress,
+        [asyncResp](const boost::system::error_code& ec,
+                    const sdbusplus::message_t& msg) {
         if (ec)
         {
             const sd_bus_error* err = msg.get_error();
@@ -1026,12 +1022,7 @@
             messages::internalError(asyncResp->res);
             return;
         }
-        },
-        "xyz.openbmc_project.Network",
-        "/xyz/openbmc_project/network/" + ifaceId,
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.MACAddress", "MACAddress",
-        dbus::utility::DbusVariantType(macAddress));
+        });
 }
 
 inline void setDHCPEnabled(const std::string& ifaceId,
@@ -1040,7 +1031,10 @@
                            const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     const std::string dhcp = getDhcpEnabledEnumeration(v4Value, v6Value);
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network",
+        "/xyz/openbmc_project/network/" + ifaceId,
+        "xyz.openbmc_project.Network.EthernetInterface", propertyName, dhcp,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -1049,19 +1043,17 @@
             return;
         }
         messages::success(asyncResp->res);
-        },
-        "xyz.openbmc_project.Network",
-        "/xyz/openbmc_project/network/" + ifaceId,
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.EthernetInterface", propertyName,
-        dbus::utility::DbusVariantType{dhcp});
+        });
 }
 
 inline void setEthernetInterfaceBoolProperty(
     const std::string& ifaceId, const std::string& propertyName,
     const bool& value, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network",
+        "/xyz/openbmc_project/network/" + ifaceId,
+        "xyz.openbmc_project.Network.EthernetInterface", propertyName, value,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -1069,19 +1061,17 @@
             messages::internalError(asyncResp->res);
             return;
         }
-        },
-        "xyz.openbmc_project.Network",
-        "/xyz/openbmc_project/network/" + ifaceId,
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.EthernetInterface", propertyName,
-        dbus::utility::DbusVariantType{value});
+        });
 }
 
 inline void setDHCPv4Config(const std::string& propertyName, const bool& value,
                             const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     BMCWEB_LOG_DEBUG << propertyName << " = " << value;
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network",
+        "/xyz/openbmc_project/network/dhcp",
+        "xyz.openbmc_project.Network.DHCPConfiguration", propertyName, value,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -1089,11 +1079,7 @@
             messages::internalError(asyncResp->res);
             return;
         }
-        },
-        "xyz.openbmc_project.Network", "/xyz/openbmc_project/network/dhcp",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.DHCPConfiguration", propertyName,
-        dbus::utility::DbusVariantType{value});
+        });
 }
 
 inline void handleDHCPPatch(const std::string& ifaceId,
@@ -1407,19 +1393,18 @@
     const std::vector<std::string>& updatedStaticNameServers,
     const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Network",
+        "/xyz/openbmc_project/network/" + ifaceId,
+        "xyz.openbmc_project.Network.EthernetInterface", "StaticNameServers",
+        updatedStaticNameServers,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
             messages::internalError(asyncResp->res);
             return;
         }
-        },
-        "xyz.openbmc_project.Network",
-        "/xyz/openbmc_project/network/" + ifaceId,
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.EthernetInterface", "StaticNameServers",
-        dbus::utility::DbusVariantType{updatedStaticNameServers});
+        });
 }
 
 inline void handleIPv6StaticAddressesPatch(
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index c16c171..c2580fe 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -351,7 +351,10 @@
 {
     BMCWEB_LOG_DEBUG << "Setting the Hypervisor IPaddress : " << ipv4Address
                      << " on Iface: " << ethIfaceId;
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/network/hypervisor/" + ethIfaceId + "/ipv4/addr0",
+        "xyz.openbmc_project.Network.IP", "Address", ipv4Address,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -359,12 +362,7 @@
             return;
         }
         BMCWEB_LOG_DEBUG << "Hypervisor IPaddress is Set";
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/network/hypervisor/" + ethIfaceId + "/ipv4/addr0",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.IP", "Address",
-        dbus::utility::DbusVariantType(ipv4Address));
+        });
 }
 
 /**
@@ -383,7 +381,10 @@
     BMCWEB_LOG_DEBUG << "Setting the Hypervisor subnet : " << subnet
                      << " on Iface: " << ethIfaceId;
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/network/hypervisor/" + ethIfaceId + "/ipv4/addr0",
+        "xyz.openbmc_project.Network.IP", "PrefixLength", subnet,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -391,12 +392,7 @@
             return;
         }
         BMCWEB_LOG_DEBUG << "SubnetMask is Set";
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/network/hypervisor/" + ethIfaceId + "/ipv4/addr0",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.IP", "PrefixLength",
-        dbus::utility::DbusVariantType(subnet));
+        });
 }
 
 /**
@@ -415,20 +411,18 @@
     BMCWEB_LOG_DEBUG
         << "Setting the DefaultGateway to the last configured gateway";
 
-    crow::connections::systemBus->async_method_call(
-        [asyncResp](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            BMCWEB_LOG_ERROR << "DBUS response error " << ec;
-            return;
-        }
-        BMCWEB_LOG_DEBUG << "Default Gateway is Set";
-        },
-        "xyz.openbmc_project.Settings",
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
         "/xyz/openbmc_project/network/hypervisor",
-        "org.freedesktop.DBus.Properties", "Set",
         "xyz.openbmc_project.Network.SystemConfiguration", "DefaultGateway",
-        dbus::utility::DbusVariantType(gateway));
+        gateway, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
+            {
+                BMCWEB_LOG_ERROR << "DBUS response error " << ec;
+                return;
+            }
+            BMCWEB_LOG_DEBUG << "Default Gateway is Set";
+        });
 }
 
 /**
@@ -514,7 +508,10 @@
                            const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
     const std::string dhcp = getDhcpEnabledEnumeration(ipv4DHCPEnabled, false);
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/network/hypervisor/" + ifaceId,
+        "xyz.openbmc_project.Network.EthernetInterface", "DHCPEnabled", dhcp,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -522,12 +519,7 @@
             messages::internalError(asyncResp->res);
             return;
         }
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/network/hypervisor/" + ifaceId,
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.EthernetInterface", "DHCPEnabled",
-        dbus::utility::DbusVariantType{dhcp});
+        });
 
     // Set the IPv4 address origin to the DHCP / Static as per the new value
     // of the DHCPEnabled property
@@ -543,7 +535,10 @@
         deleteHypervisorIPv4(ifaceId, asyncResp);
         origin = "xyz.openbmc_project.Network.IP.AddressOrigin.DHCP";
     }
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/network/hypervisor/" + ifaceId + "/ipv4/addr0",
+        "xyz.openbmc_project.Network.IP", "Origin", origin,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -552,12 +547,7 @@
             return;
         }
         BMCWEB_LOG_DEBUG << "Hypervisor IPaddress Origin is Set";
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/network/hypervisor/" + ifaceId + "/ipv4/addr0",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.IP", "Origin",
-        dbus::utility::DbusVariantType(origin));
+        });
 }
 
 inline void handleHypervisorIPv4StaticPatch(
@@ -675,38 +665,32 @@
     }
 
     asyncResp->res.jsonValue["HostName"] = hostName;
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/network/hypervisor/",
+        "xyz.openbmc_project.Network.SystemConfiguration", "HostName", hostName,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
             messages::internalError(asyncResp->res);
         }
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/network/hypervisor",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Network.SystemConfiguration", "HostName",
-        dbus::utility::DbusVariantType(hostName));
+        });
 }
 
 inline void
     setIPv4InterfaceEnabled(const std::string& ifaceId, bool isActive,
                             const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
 {
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/network/hypervisor/" + ifaceId + "/ipv4/addr0",
+        "xyz.openbmc_project.Object.Enable", "Enabled", isActive,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
-            BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
             messages::internalError(asyncResp->res);
-            return;
         }
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/network/hypervisor/" + ifaceId + "/ipv4/addr0",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Object.Enable", "Enabled",
-        dbus::utility::DbusVariantType(isActive));
+        });
 }
 
 inline void handleHypervisorEthernetInterfaceCollectionGet(
@@ -1021,7 +1005,10 @@
 
     std::string command = "xyz.openbmc_project.State.Host.Transition.On";
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.State.Hypervisor",
+        "/xyz/openbmc_project/state/hypervisor0",
+        "xyz.openbmc_project.State.Host", "RequestedHostTransition", command,
         [asyncResp, resetType](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -1043,12 +1030,7 @@
             return;
         }
         messages::success(asyncResp->res);
-        },
-        "xyz.openbmc_project.State.Hypervisor",
-        "/xyz/openbmc_project/state/hypervisor0",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.State.Host", "RequestedHostTransition",
-        dbus::utility::DbusVariantType{std::move(command)});
+        });
 }
 
 inline void requestRoutesHypervisorSystems(App& app)
diff --git a/redfish-core/lib/led.hpp b/redfish-core/lib/led.hpp
index 64b097a..53df1db 100644
--- a/redfish-core/lib/led.hpp
+++ b/redfish-core/lib/led.hpp
@@ -122,7 +122,10 @@
         return;
     }
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.LED.GroupManager",
+        "/xyz/openbmc_project/led/groups/enclosure_identify_blink",
+        "xyz.openbmc_project.Led.Group", "Asserted", ledBlinkng,
         [asyncResp, ledOn,
          ledBlinkng](const boost::system::error_code& ec) mutable {
         if (ec)
@@ -135,7 +138,11 @@
                 ledOn = true;
             }
         }
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus,
+            "xyz.openbmc_project.LED.GroupManager",
+            "/xyz/openbmc_project/led/groups/enclosure_identify",
+            "xyz.openbmc_project.Led.Group", "Asserted", ledBlinkng,
             [asyncResp](const boost::system::error_code& ec2) {
             if (ec2)
             {
@@ -144,18 +151,8 @@
                 return;
             }
             messages::success(asyncResp->res);
-            },
-            "xyz.openbmc_project.LED.GroupManager",
-            "/xyz/openbmc_project/led/groups/enclosure_identify",
-            "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.Led.Group", "Asserted",
-            dbus::utility::DbusVariantType(ledOn));
-        },
-        "xyz.openbmc_project.LED.GroupManager",
-        "/xyz/openbmc_project/led/groups/enclosure_identify_blink",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Led.Group", "Asserted",
-        dbus::utility::DbusVariantType(ledBlinkng));
+            });
+        });
 }
 
 /**
@@ -229,14 +226,21 @@
 {
     BMCWEB_LOG_DEBUG << "Set LocationIndicatorActive";
 
-    crow::connections::systemBus->async_method_call(
-        [asyncResp, ledState](const boost::system::error_code& ec) mutable {
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.LED.GroupManager",
+        "/xyz/openbmc_project/led/groups/enclosure_identify_blink",
+        "xyz.openbmc_project.Led.Group", "Asserted", ledState,
+        [asyncResp, ledState](const boost::system::error_code& ec) {
         if (ec)
         {
             // Some systems may not have enclosure_identify_blink object so
             // lets set enclosure_identify state also if
             // enclosure_identify_blink failed
-            crow::connections::systemBus->async_method_call(
+            sdbusplus::asio::setProperty(
+                *crow::connections::systemBus,
+                "xyz.openbmc_project.LED.GroupManager",
+                "/xyz/openbmc_project/led/groups/enclosure_identify",
+                "xyz.openbmc_project.Led.Group", "Asserted", ledState,
                 [asyncResp](const boost::system::error_code& ec2) {
                 if (ec2)
                 {
@@ -244,18 +248,8 @@
                     messages::internalError(asyncResp->res);
                     return;
                 }
-                },
-                "xyz.openbmc_project.LED.GroupManager",
-                "/xyz/openbmc_project/led/groups/enclosure_identify",
-                "org.freedesktop.DBus.Properties", "Set",
-                "xyz.openbmc_project.Led.Group", "Asserted",
-                dbus::utility::DbusVariantType(ledState));
+                });
         }
-        },
-        "xyz.openbmc_project.LED.GroupManager",
-        "/xyz/openbmc_project/led/groups/enclosure_identify_blink",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Led.Group", "Asserted",
-        dbus::utility::DbusVariantType(ledState));
+        });
 }
 } // namespace redfish
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 7ad489b..ce4203b 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -1883,7 +1883,10 @@
         }
         BMCWEB_LOG_DEBUG << "Set Resolved";
 
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, "xyz.openbmc_project.Logging",
+            "/xyz/openbmc_project/logging/entry/" + entryId,
+            "xyz.openbmc_project.Logging.Entry", "Resolved", *resolved,
             [asyncResp, entryId](const boost::system::error_code& ec) {
             if (ec)
             {
@@ -1891,12 +1894,7 @@
                 messages::internalError(asyncResp->res);
                 return;
             }
-            },
-            "xyz.openbmc_project.Logging",
-            "/xyz/openbmc_project/logging/entry/" + entryId,
-            "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.Logging.Entry", "Resolved",
-            dbus::utility::DbusVariantType(*resolved));
+            });
         });
 
     BMCWEB_ROUTE(
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index a3f060b..c97ba02 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -61,9 +61,9 @@
     const char* destProperty = "RequestedBMCTransition";
 
     // Create the D-Bus variant for D-Bus call.
-    dbus::utility::DbusVariantType dbusPropertyValue(propertyValue);
-
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, processName, objectPath, interfaceName,
+        destProperty, propertyValue,
         [asyncResp](const boost::system::error_code& ec) {
         // Use "Set" method to set the property value.
         if (ec)
@@ -74,9 +74,7 @@
         }
 
         messages::success(asyncResp->res);
-        },
-        processName, objectPath, "org.freedesktop.DBus.Properties", "Set",
-        interfaceName, destProperty, dbusPropertyValue);
+        });
 }
 
 inline void
@@ -90,9 +88,9 @@
     const char* destProperty = "RequestedBMCTransition";
 
     // Create the D-Bus variant for D-Bus call.
-    dbus::utility::DbusVariantType dbusPropertyValue(propertyValue);
-
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, processName, objectPath, interfaceName,
+        destProperty, propertyValue,
         [asyncResp](const boost::system::error_code& ec) {
         // Use "Set" method to set the property value.
         if (ec)
@@ -103,9 +101,7 @@
         }
 
         messages::success(asyncResp->res);
-        },
-        processName, objectPath, "org.freedesktop.DBus.Properties", "Set",
-        interfaceName, destProperty, dbusPropertyValue);
+        });
 }
 
 /**
@@ -1466,17 +1462,16 @@
                 return;
             }
             currentProfile = *profile;
-            crow::connections::systemBus->async_method_call(
+            sdbusplus::asio::setProperty(
+                *crow::connections::systemBus, profileConnection, profilePath,
+                thermalModeIface, "Current", *profile,
                 [response](const boost::system::error_code& ec) {
                 if (ec)
                 {
                     BMCWEB_LOG_ERROR << "Error patching profile" << ec;
                     messages::internalError(response->res);
                 }
-                },
-                profileConnection, profilePath,
-                "org.freedesktop.DBus.Properties", "Set", thermalModeIface,
-                "Current", dbus::utility::DbusVariantType(*profile));
+                });
         }
 
         for (auto& containerPair : configuration)
@@ -1600,7 +1595,10 @@
                 {
                     for (const auto& property : output)
                     {
-                        crow::connections::systemBus->async_method_call(
+                        sdbusplus::asio::setProperty(
+                            *crow::connections::systemBus,
+                            "xyz.openbmc_project.EntityManager", path, iface,
+                            property.first, property.second,
                             [response,
                              propertyName{std::string(property.first)}](
                                 const boost::system::error_code& ec) {
@@ -1612,10 +1610,7 @@
                                 return;
                             }
                             messages::success(response->res);
-                            },
-                            "xyz.openbmc_project.EntityManager", path,
-                            "org.freedesktop.DBus.Properties", "Set", iface,
-                            property.first, property.second);
+                            });
                     }
                 }
                 else
@@ -1839,7 +1834,12 @@
         // Only support Immediate
         // An addition could be a Redfish Setting like
         // ActiveSoftwareImageApplyTime and support OnReset
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus,
+            "xyz.openbmc_project.Software.BMC.Updater",
+            "/xyz/openbmc_project/software/" + firmwareId,
+            "xyz.openbmc_project.Software.RedundancyPriority", "Priority",
+            static_cast<uint8_t>(0),
             [asyncResp](const boost::system::error_code& ec2) {
             if (ec2)
             {
@@ -1848,13 +1848,7 @@
                 return;
             }
             doBMCGracefulRestart(asyncResp);
-            },
-
-            "xyz.openbmc_project.Software.BMC.Updater",
-            "/xyz/openbmc_project/software/" + firmwareId,
-            "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.Software.RedundancyPriority", "Priority",
-            dbus::utility::DbusVariantType(static_cast<uint8_t>(0)));
+            });
         });
 }
 
@@ -1871,7 +1865,10 @@
                                            "DateTime");
         return;
     }
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Time.Manager",
+        "/xyz/openbmc_project/time/bmc", "xyz.openbmc_project.Time.EpochTime",
+        "Elapsed", us->count(),
         [asyncResp{std::move(asyncResp)},
          datetime{std::move(datetime)}](const boost::system::error_code& ec) {
         if (ec)
@@ -1883,11 +1880,7 @@
             return;
         }
         asyncResp->res.jsonValue["DateTime"] = datetime;
-        },
-        "xyz.openbmc_project.Time.Manager", "/xyz/openbmc_project/time/bmc",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Time.EpochTime", "Elapsed",
-        dbus::utility::DbusVariantType(us->count()));
+        });
 }
 
 inline void
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index 35c3dae..2792dcf 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -252,17 +252,17 @@
             "xyz.openbmc_project.Time.Synchronization.Method.Manual";
     }
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/time/sync_method",
+        "xyz.openbmc_project.Time.Synchronization", "TimeSyncMethod",
+        timeSyncMethod,
         [asyncResp](const boost::system::error_code& errorCode) {
         if (errorCode)
         {
             messages::internalError(asyncResp->res);
         }
-        },
-        "xyz.openbmc_project.Settings", "/xyz/openbmc_project/time/sync_method",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Time.Synchronization", "TimeSyncMethod",
-        dbus::utility::DbusVariantType{timeSyncMethod});
+        });
 }
 
 inline void
@@ -369,17 +369,16 @@
                         continue;
                     }
 
-                    crow::connections::systemBus->async_method_call(
+                    sdbusplus::asio::setProperty(
+                        *crow::connections::systemBus, service, objectPath,
+                        interface, "StaticNTPServers", currentNtpServers,
                         [asyncResp](const boost::system::error_code& ec2) {
                         if (ec2)
                         {
                             messages::internalError(asyncResp->res);
                             return;
                         }
-                        },
-                        service, objectPath, "org.freedesktop.DBus.Properties",
-                        "Set", interface, "StaticNTPServers",
-                        dbus::utility::DbusVariantType{currentNtpServers});
+                        });
                 }
             }
         }
@@ -408,31 +407,30 @@
         {
             if (boost::algorithm::starts_with(entry.first, netBasePath))
             {
-                crow::connections::systemBus->async_method_call(
-                    [asyncResp](const boost::system::error_code& ec2) {
-                    if (ec2)
-                    {
-                        messages::internalError(asyncResp->res);
-                        return;
-                    }
-                    },
-                    entry.second.begin()->first, entry.first,
-                    "org.freedesktop.DBus.Properties", "Set",
+                sdbusplus::asio::setProperty(
+                    *crow::connections::systemBus, entry.second.begin()->first,
+                    entry.first,
                     "xyz.openbmc_project.Control.Service.Attributes", "Running",
-                    dbus::utility::DbusVariantType{protocolEnabled});
-
-                crow::connections::systemBus->async_method_call(
+                    protocolEnabled,
                     [asyncResp](const boost::system::error_code& ec2) {
                     if (ec2)
                     {
                         messages::internalError(asyncResp->res);
                         return;
                     }
-                    },
-                    entry.second.begin()->first, entry.first,
-                    "org.freedesktop.DBus.Properties", "Set",
+                    });
+                sdbusplus::asio::setProperty(
+                    *crow::connections::systemBus, entry.second.begin()->first,
+                    entry.first,
                     "xyz.openbmc_project.Control.Service.Attributes", "Enabled",
-                    dbus::utility::DbusVariantType{protocolEnabled});
+                    protocolEnabled,
+                    [asyncResp](const boost::system::error_code& ec2) {
+                    if (ec2)
+                    {
+                        messages::internalError(asyncResp->res);
+                        return;
+                    }
+                    });
             }
         }
         });
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 3072b89..4aaac67 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -97,7 +97,10 @@
                 return;
             }
 
-            crow::connections::systemBus->async_method_call(
+            sdbusplus::asio::setProperty(
+                *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+                "/xyz/openbmc_project/control/host0/power_cap",
+                "xyz.openbmc_project.Control.Power.Cap", "PowerCap", *value,
                 [sensorsAsyncResp](const boost::system::error_code& ec2) {
                 if (ec2)
                 {
@@ -107,12 +110,7 @@
                 }
                 sensorsAsyncResp->asyncResp->res.result(
                     boost::beast::http::status::no_content);
-                },
-                "xyz.openbmc_project.Settings",
-                "/xyz/openbmc_project/control/host0/power_cap",
-                "org.freedesktop.DBus.Properties", "Set",
-                "xyz.openbmc_project.Control.Power.Cap", "PowerCap",
-                std::variant<uint32_t>(*value));
+                });
             });
     };
     redfish::chassis_utils::getValidChassisPath(sensorsAsyncResp->asyncResp,
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 1806ffc..8efa78e 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -1122,14 +1122,14 @@
     BMCWEB_LOG_INFO << "Setting config to " << configPath.str;
 
     // Set the property, with handler to check error responses
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, *controlService, cpuObjectPath,
+        "xyz.openbmc_project.Control.Processor.CurrentOperatingConfig",
+        "AppliedConfig", configPath,
         [resp, appliedConfigUri](const boost::system::error_code& ec,
                                  const sdbusplus::message_t& msg) {
         handleAppliedConfigResponse(resp, appliedConfigUri, ec, msg);
-        },
-        *controlService, cpuObjectPath, "org.freedesktop.DBus.Properties",
-        "Set", "xyz.openbmc_project.Control.Processor.CurrentOperatingConfig",
-        "AppliedConfig", dbus::utility::DbusVariantType(std::move(configPath)));
+        });
 }
 
 inline void
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 3fbbd2d..011e670 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -2694,7 +2694,10 @@
                     messages::internalError(sensorAsyncResp->asyncResp->res);
                     return;
                 }
-                crow::connections::systemBus->async_method_call(
+                sdbusplus::asio::setProperty(
+                    *crow::connections::systemBus, item.second, item.first,
+                    "xyz.openbmc_project.Sensor.Value", "Value",
+                    iterator->second.first,
                     [sensorAsyncResp](const boost::system::error_code& ec) {
                     if (ec)
                     {
@@ -2714,10 +2717,7 @@
                         messages::internalError(
                             sensorAsyncResp->asyncResp->res);
                     }
-                    },
-                    item.second, item.first, "org.freedesktop.DBus.Properties",
-                    "Set", "xyz.openbmc_project.Sensor.Value", "Value",
-                    dbus::utility::DbusVariantType(iterator->second.first));
+                    });
             }
         };
         // Get object with connection for the given sensor name
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 70f8870..e2e3ed4 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -1332,20 +1332,20 @@
     const uint32_t retryAttempts)
 {
     BMCWEB_LOG_DEBUG << "Set Automatic Retry Attempts.";
-    crow::connections::systemBus->async_method_call(
-        [asyncResp](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            BMCWEB_LOG_ERROR
-                << "DBUS response error: Set setAutomaticRetryAttempts" << ec;
-            messages::internalError(asyncResp->res);
-            return;
-        }
-        },
-        "xyz.openbmc_project.State.Host", "/xyz/openbmc_project/state/host0",
-        "org.freedesktop.DBus.Properties", "Set",
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.State.Host",
+        "/xyz/openbmc_project/state/host0",
         "xyz.openbmc_project.Control.Boot.RebootAttempts", "RetryAttempts",
-        std::variant<uint32_t>(retryAttempts));
+        retryAttempts, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
+            {
+                BMCWEB_LOG_ERROR
+                    << "DBUS response error: Set setAutomaticRetryAttempts"
+                    << ec;
+                messages::internalError(asyncResp->res);
+                return;
+            }
+        });
 }
 
 inline computer_system::PowerRestorePolicyTypes
@@ -1558,7 +1558,9 @@
         }
 
         // Valid TPM Enable object found, now setting the value
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, serv, path,
+            "xyz.openbmc_project.Control.TPM.Policy", "TPMEnable", tpmRequired,
             [asyncResp](const boost::system::error_code& ec2) {
             if (ec2)
             {
@@ -1569,10 +1571,7 @@
                 return;
             }
             BMCWEB_LOG_DEBUG << "Set TrustedModuleRequiredToBoot done.";
-            },
-            serv, path, "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.Control.TPM.Policy", "TPMEnable",
-            dbus::utility::DbusVariantType(tpmRequired));
+            });
         });
 }
 
@@ -1617,7 +1616,10 @@
     // Act on validated parameters
     BMCWEB_LOG_DEBUG << "DBUS boot type: " << bootTypeStr;
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/control/host0/boot",
+        "xyz.openbmc_project.Control.Boot.Type", "BootType", bootTypeStr,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -1631,12 +1633,7 @@
             return;
         }
         BMCWEB_LOG_DEBUG << "Boot type update done.";
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/control/host0/boot",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Control.Boot.Type", "BootType",
-        dbus::utility::DbusVariantType(bootTypeStr));
+        });
 }
 
 /**
@@ -1687,7 +1684,10 @@
     // Act on validated parameters
     BMCWEB_LOG_DEBUG << "DBUS boot override enable: " << bootOverrideEnable;
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/control/host0/boot",
+        "xyz.openbmc_project.Object.Enable", "Enabled", bootOverrideEnable,
         [asyncResp](const boost::system::error_code& ec2) {
         if (ec2)
         {
@@ -1696,12 +1696,7 @@
             return;
         }
         BMCWEB_LOG_DEBUG << "Boot override enable update done.";
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/control/host0/boot",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Object.Enable", "Enabled",
-        dbus::utility::DbusVariantType(bootOverrideEnable));
+        });
 
     if (!bootOverrideEnable)
     {
@@ -1713,7 +1708,10 @@
     BMCWEB_LOG_DEBUG << "DBUS boot override persistent: "
                      << bootOverridePersistent;
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/control/host0/boot/one_time",
+        "xyz.openbmc_project.Object.Enable", "Enabled", !bootOverridePersistent,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -1722,12 +1720,7 @@
             return;
         }
         BMCWEB_LOG_DEBUG << "Boot one_time update done.";
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/control/host0/boot/one_time",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Object.Enable", "Enabled",
-        dbus::utility::DbusVariantType(!bootOverridePersistent));
+        });
 }
 
 /**
@@ -1768,7 +1761,10 @@
     BMCWEB_LOG_DEBUG << "DBUS boot source: " << bootSourceStr;
     BMCWEB_LOG_DEBUG << "DBUS boot mode: " << bootModeStr;
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/control/host0/boot",
+        "xyz.openbmc_project.Control.Boot.Source", "BootSource", bootSourceStr,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -1777,14 +1773,12 @@
             return;
         }
         BMCWEB_LOG_DEBUG << "Boot source update done.";
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/control/host0/boot",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Control.Boot.Source", "BootSource",
-        dbus::utility::DbusVariantType(bootSourceStr));
+        });
 
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
+        "/xyz/openbmc_project/control/host0/boot",
+        "xyz.openbmc_project.Control.Boot.Mode", "BootMode", bootModeStr,
         [asyncResp](const boost::system::error_code& ec) {
         if (ec)
         {
@@ -1793,12 +1787,7 @@
             return;
         }
         BMCWEB_LOG_DEBUG << "Boot mode update done.";
-        },
-        "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/control/host0/boot",
-        "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Control.Boot.Mode", "BootMode",
-        dbus::utility::DbusVariantType(bootModeStr));
+        });
 }
 
 /**
@@ -1880,19 +1869,18 @@
             return;
         }
 
-        crow::connections::systemBus->async_method_call(
-            [asyncResp](const boost::system::error_code& ec2) {
-            if (ec2)
-            {
-                BMCWEB_LOG_DEBUG << "D-Bus response error on AssetTag Set "
-                                 << ec2;
-                messages::internalError(asyncResp->res);
-                return;
-            }
-            },
-            service, path, "org.freedesktop.DBus.Properties", "Set",
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, service, path,
             "xyz.openbmc_project.Inventory.Decorator.AssetTag", "AssetTag",
-            dbus::utility::DbusVariantType(assetTag));
+            assetTag, [asyncResp](const boost::system::error_code& ec2) {
+                if (ec2)
+                {
+                    BMCWEB_LOG_DEBUG << "D-Bus response error on AssetTag Set "
+                                     << ec2;
+                    messages::internalError(asyncResp->res);
+                    return;
+                }
+            });
         });
 }
 
@@ -1930,19 +1918,17 @@
         return;
     }
 
-    crow::connections::systemBus->async_method_call(
-        [asyncResp](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            messages::internalError(asyncResp->res);
-            return;
-        }
-        },
-        "xyz.openbmc_project.Settings",
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
         "/xyz/openbmc_project/control/host0/auto_reboot",
-        "org.freedesktop.DBus.Properties", "Set",
         "xyz.openbmc_project.Control.Boot.RebootPolicy", "AutoReboot",
-        dbus::utility::DbusVariantType(autoRebootEnabled));
+        autoRebootEnabled, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
+            {
+                messages::internalError(asyncResp->res);
+                return;
+            }
+        });
 }
 
 inline std::string dbusPowerRestorePolicyFromRedfish(std::string_view policy)
@@ -1985,19 +1971,17 @@
         return;
     }
 
-    crow::connections::systemBus->async_method_call(
-        [asyncResp](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            messages::internalError(asyncResp->res);
-            return;
-        }
-        },
-        "xyz.openbmc_project.Settings",
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
         "/xyz/openbmc_project/control/host0/power_restore_policy",
-        "org.freedesktop.DBus.Properties", "Set",
         "xyz.openbmc_project.Control.Power.RestorePolicy", "PowerRestorePolicy",
-        dbus::utility::DbusVariantType(powerRestorePolicy));
+        powerRestorePolicy, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
+            {
+                messages::internalError(asyncResp->res);
+                return;
+            }
+        });
 }
 
 #ifdef BMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE
@@ -2295,17 +2279,16 @@
                          << path;
 
         // Set the Power Mode property
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, service, path,
+            "xyz.openbmc_project.Control.Power.Mode", "PowerMode", powerMode,
             [asyncResp](const boost::system::error_code& ec2) {
             if (ec2)
             {
                 messages::internalError(asyncResp->res);
                 return;
             }
-            },
-            service, path, "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.Control.Power.Mode", "PowerMode",
-            dbus::utility::DbusVariantType(powerMode));
+            });
         });
 }
 
@@ -2463,25 +2446,26 @@
             return;
         }
 
-        crow::connections::systemBus->async_method_call(
-            [asyncResp](const boost::system::error_code& ec) {
-            if (ec)
-            {
-                BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
-                messages::internalError(asyncResp->res);
-                return;
-            }
-            },
-            "xyz.openbmc_project.Watchdog",
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, "xyz.openbmc_project.Watchdog",
             "/xyz/openbmc_project/watchdog/host0",
-            "org.freedesktop.DBus.Properties", "Set",
             "xyz.openbmc_project.State.Watchdog", "ExpireAction",
-            dbus::utility::DbusVariantType(wdtTimeOutActStr));
+            wdtTimeOutActStr, [asyncResp](const boost::system::error_code& ec) {
+                if (ec)
+                {
+                    BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
+                    messages::internalError(asyncResp->res);
+                    return;
+                }
+            });
     }
 
     if (wdtEnable)
     {
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, "xyz.openbmc_project.Watchdog",
+            "/xyz/openbmc_project/watchdog/host0",
+            "xyz.openbmc_project.State.Watchdog", "Enabled", *wdtEnable,
             [asyncResp](const boost::system::error_code& ec) {
             if (ec)
             {
@@ -2489,12 +2473,7 @@
                 messages::internalError(asyncResp->res);
                 return;
             }
-            },
-            "xyz.openbmc_project.Watchdog",
-            "/xyz/openbmc_project/watchdog/host0",
-            "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.State.Watchdog", "Enabled",
-            dbus::utility::DbusVariantType(*wdtEnable));
+            });
     }
 }
 
@@ -2725,22 +2704,24 @@
 
         if (ipsEnable)
         {
-            crow::connections::systemBus->async_method_call(
-                [asyncResp](const boost::system::error_code& ec2) {
-                if (ec2)
-                {
-                    BMCWEB_LOG_DEBUG << "DBUS response error " << ec2;
-                    messages::internalError(asyncResp->res);
-                    return;
-                }
-                },
-                service, path, "org.freedesktop.DBus.Properties", "Set",
+            sdbusplus::asio::setProperty(
+                *crow::connections::systemBus, service, path,
                 "xyz.openbmc_project.Control.Power.IdlePowerSaver", "Enabled",
-                dbus::utility::DbusVariantType(*ipsEnable));
+                *ipsEnable, [asyncResp](const boost::system::error_code& ec2) {
+                    if (ec2)
+                    {
+                        BMCWEB_LOG_DEBUG << "DBUS response error " << ec2;
+                        messages::internalError(asyncResp->res);
+                        return;
+                    }
+                });
         }
         if (ipsEnterUtil)
         {
-            crow::connections::systemBus->async_method_call(
+            sdbusplus::asio::setProperty(
+                *crow::connections::systemBus, service, path,
+                "xyz.openbmc_project.Control.Power.IdlePowerSaver",
+                "EnterUtilizationPercent", *ipsEnterUtil,
                 [asyncResp](const boost::system::error_code& ec2) {
                 if (ec2)
                 {
@@ -2748,17 +2729,16 @@
                     messages::internalError(asyncResp->res);
                     return;
                 }
-                },
-                service, path, "org.freedesktop.DBus.Properties", "Set",
-                "xyz.openbmc_project.Control.Power.IdlePowerSaver",
-                "EnterUtilizationPercent",
-                dbus::utility::DbusVariantType(*ipsEnterUtil));
+                });
         }
         if (ipsEnterTime)
         {
             // Convert from seconds into milliseconds for DBus
             const uint64_t timeMilliseconds = *ipsEnterTime * 1000;
-            crow::connections::systemBus->async_method_call(
+            sdbusplus::asio::setProperty(
+                *crow::connections::systemBus, service, path,
+                "xyz.openbmc_project.Control.Power.IdlePowerSaver",
+                "EnterDwellTime", timeMilliseconds,
                 [asyncResp](const boost::system::error_code& ec2) {
                 if (ec2)
                 {
@@ -2766,15 +2746,14 @@
                     messages::internalError(asyncResp->res);
                     return;
                 }
-                },
-                service, path, "org.freedesktop.DBus.Properties", "Set",
-                "xyz.openbmc_project.Control.Power.IdlePowerSaver",
-                "EnterDwellTime",
-                dbus::utility::DbusVariantType(timeMilliseconds));
+                });
         }
         if (ipsExitUtil)
         {
-            crow::connections::systemBus->async_method_call(
+            sdbusplus::asio::setProperty(
+                *crow::connections::systemBus, service, path,
+                "xyz.openbmc_project.Control.Power.IdlePowerSaver",
+                "ExitUtilizationPercent", *ipsExitUtil,
                 [asyncResp](const boost::system::error_code& ec2) {
                 if (ec2)
                 {
@@ -2782,17 +2761,16 @@
                     messages::internalError(asyncResp->res);
                     return;
                 }
-                },
-                service, path, "org.freedesktop.DBus.Properties", "Set",
-                "xyz.openbmc_project.Control.Power.IdlePowerSaver",
-                "ExitUtilizationPercent",
-                dbus::utility::DbusVariantType(*ipsExitUtil));
+                });
         }
         if (ipsExitTime)
         {
             // Convert from seconds into milliseconds for DBus
             const uint64_t timeMilliseconds = *ipsExitTime * 1000;
-            crow::connections::systemBus->async_method_call(
+            sdbusplus::asio::setProperty(
+                *crow::connections::systemBus, service, path,
+                "xyz.openbmc_project.Control.Power.IdlePowerSaver",
+                "ExitDwellTime", timeMilliseconds,
                 [asyncResp](const boost::system::error_code& ec2) {
                 if (ec2)
                 {
@@ -2800,11 +2778,7 @@
                     messages::internalError(asyncResp->res);
                     return;
                 }
-                },
-                service, path, "org.freedesktop.DBus.Properties", "Set",
-                "xyz.openbmc_project.Control.Power.IdlePowerSaver",
-                "ExitDwellTime",
-                dbus::utility::DbusVariantType(timeMilliseconds));
+                });
         }
         });
 
@@ -3023,7 +2997,11 @@
 
     if (hostCommand)
     {
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, "xyz.openbmc_project.State.Host",
+            "/xyz/openbmc_project/state/host0",
+            "xyz.openbmc_project.State.Host", "RequestedHostTransition",
+            command,
             [asyncResp, resetType](const boost::system::error_code& ec,
                                    sdbusplus::message_t& sdbusErrMsg) {
             if (ec)
@@ -3034,16 +3012,15 @@
                 return;
             }
             messages::success(asyncResp->res);
-            },
-            "xyz.openbmc_project.State.Host",
-            "/xyz/openbmc_project/state/host0",
-            "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.State.Host", "RequestedHostTransition",
-            dbus::utility::DbusVariantType{command});
+            });
     }
     else
     {
-        crow::connections::systemBus->async_method_call(
+        sdbusplus::asio::setProperty(
+            *crow::connections::systemBus, "xyz.openbmc_project.State.Chassis",
+            "/xyz/openbmc_project/state/chassis0",
+            "xyz.openbmc_project.State.Chassis", "RequestedPowerTransition",
+            command,
             [asyncResp, resetType](const boost::system::error_code& ec,
                                    sdbusplus::message_t& sdbusErrMsg) {
             if (ec)
@@ -3053,12 +3030,7 @@
                 return;
             }
             messages::success(asyncResp->res);
-            },
-            "xyz.openbmc_project.State.Chassis",
-            "/xyz/openbmc_project/state/chassis0",
-            "org.freedesktop.DBus.Properties", "Set",
-            "xyz.openbmc_project.State.Chassis", "RequestedPowerTransition",
-            dbus::utility::DbusVariantType{command});
+            });
     }
 }
 
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 795010d..45d5664 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -63,18 +63,17 @@
                                  const std::string& service)
 {
     BMCWEB_LOG_DEBUG << "Activate image for " << objPath << " " << service;
-    crow::connections::systemBus->async_method_call(
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, service, objPath,
+        "xyz.openbmc_project.Software.Activation", "RequestedActivation",
+        "xyz.openbmc_project.Software.Activation.RequestedActivations.Active",
         [](const boost::system::error_code& errorCode) {
         if (errorCode)
         {
             BMCWEB_LOG_DEBUG << "error_code = " << errorCode;
             BMCWEB_LOG_DEBUG << "error msg = " << errorCode.message();
         }
-        },
-        service, objPath, "org.freedesktop.DBus.Properties", "Set",
-        "xyz.openbmc_project.Software.Activation", "RequestedActivation",
-        dbus::utility::DbusVariantType(
-            "xyz.openbmc_project.Software.Activation.RequestedActivations.Active"));
+        });
 }
 
 // Note that asyncResp can be either a valid pointer or nullptr. If nullptr
@@ -575,21 +574,19 @@
     }
 
     // Set the requested image apply time value
-    crow::connections::systemBus->async_method_call(
-        [asyncResp](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
-            messages::internalError(asyncResp->res);
-            return;
-        }
-        messages::success(asyncResp->res);
-        },
-        "xyz.openbmc_project.Settings",
+    sdbusplus::asio::setProperty(
+        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
         "/xyz/openbmc_project/software/apply_time",
-        "org.freedesktop.DBus.Properties", "Set",
         "xyz.openbmc_project.Software.ApplyTime", "RequestedApplyTime",
-        dbus::utility::DbusVariantType{applyTimeNewVal});
+        applyTimeNewVal, [asyncResp](const boost::system::error_code& ec) {
+            if (ec)
+            {
+                BMCWEB_LOG_ERROR << "D-Bus responses error: " << ec;
+                messages::internalError(asyncResp->res);
+                return;
+            }
+            messages::success(asyncResp->res);
+        });
 }
 
 inline void
