diff --git a/src/meson.build b/src/meson.build
index d183f6d..65ecd02 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -8,6 +8,7 @@
 
 sources = [
   'asset_info.cpp',
+  'utils.cpp',
 ]
 
 deps = [
diff --git a/src/utils.cpp b/src/utils.cpp
new file mode 100644
index 0000000..35556b6
--- /dev/null
+++ b/src/utils.cpp
@@ -0,0 +1,100 @@
+#include "utils.hpp"
+
+namespace ipmi
+{
+namespace iei
+{
+
+Cc getAllDbusObjects(ipmi::Context::ptr ctx, const std::string& serviceRoot,
+                     const std::string& interface, ObjectTree& objectTree)
+{
+    auto ec = ipmi::getAllDbusObjects(ctx, serviceRoot, interface, objectTree);
+    if (ec)
+    {
+        lg2::error(
+            "getAllDbusObjects for (path:{ROOTPATH}, intf:{INTF}) failed with {ERRMSG}",
+            "ROOTPATH", serviceRoot, "INTF", interface, "ERRMSG", ec.message());
+        return ccUnspecifiedError;
+    }
+
+    return ccSuccess;
+}
+
+Cc getService(ipmi::Context::ptr ctx, const std::string& interface,
+              const std::string& path, std::string& service)
+{
+    auto ec = ipmi::getService(ctx, interface, path, service);
+    if (ec)
+    {
+        lg2::error(
+            "getService for (path:{PATH}, interface:{INTERFACE}) failed with {ERRMSG}",
+            "PATH", path, "INTERFACE", interface, "ERRMSG", ec.message());
+        return ccUnspecifiedError;
+    }
+
+    return ccSuccess;
+}
+
+Cc setDbusProperty(ipmi::Context::ptr ctx, const std::string& service,
+                   const std::string& objPath, const std::string interface,
+                   const std::string property, const Value& value)
+{
+    auto ec = ipmi::setDbusProperty(ctx, service, objPath, interface, property,
+                                    value);
+    if (ec)
+    {
+        lg2::error(
+            "setDbusProperty for (service:{SERVICE}, path:{PATH}, interface:{INTERFACE}) failed with {ERRMSG}",
+            "SERVICE", service, "PATH", objPath, "INTERFACE", interface,
+            "ERRMSG", ec.message());
+        if (ec == boost::system::errc::make_error_code(
+                      boost::system::errc::invalid_argument))
+        {
+            return ccInvalidFieldRequest;
+        }
+        return ccUnspecifiedError;
+    }
+
+    return ccSuccess;
+}
+
+Cc setDbusProperty(ipmi::Context::ptr ctx, const std::string& objPath,
+                   const std::string interface, const std::string property,
+                   const Value& value)
+{
+    std::string service;
+    auto cc = iei::getService(ctx, interface, objPath, service);
+    if (cc != ccSuccess)
+    {
+        return cc;
+    }
+
+    return iei::setDbusProperty(ctx, service, objPath, interface, property,
+                                value);
+}
+
+Cc getAllDbusProperties(Context::ptr ctx, const std::string& service,
+                        const std::string& objPath,
+                        const std::string& interface, PropertyMap& properties)
+{
+    auto ec = ipmi::getAllDbusProperties(ctx, service, objPath, interface,
+                                         properties);
+    if (ec)
+    {
+        lg2::error(
+            "getAllDbusProperties for (service:{SERVICE}, path:{PATH}, interface:{INTERFACE}) failed with {ERRMSG}",
+            "SERVICE", service, "PATH", objPath, "INTERFACE", interface,
+            "ERRMSG", ec.message());
+        if (ec == boost::system::errc::make_error_code(
+                      boost::system::errc::invalid_argument))
+        {
+            return ccInvalidFieldRequest;
+        }
+        return ccUnspecifiedError;
+    }
+
+    return ccSuccess;
+}
+
+} // namespace iei
+} // namespace ipmi
diff --git a/src/utils.hpp b/src/utils.hpp
new file mode 100644
index 0000000..231c1c9
--- /dev/null
+++ b/src/utils.hpp
@@ -0,0 +1,104 @@
+#include <ipmid/api-types.hpp>
+#include <ipmid/utils.hpp>
+#include <phosphor-logging/lg2.hpp>
+
+namespace ipmi
+{
+namespace iei
+{
+
+Cc getAllDbusObjects(ipmi::Context::ptr ctx, const std::string& serviceRoot,
+                     const std::string& interface, ObjectTree& objectTree);
+
+Cc getService(ipmi::Context::ptr ctx, const std::string& interface,
+              const std::string& path, std::string& service);
+
+Cc setDbusProperty(ipmi::Context::ptr ctx, const std::string& service,
+                   const std::string& objPath, const std::string interface,
+                   const std::string property, const Value& value);
+
+Cc setDbusProperty(ipmi::Context::ptr ctx, const std::string& objPath,
+                   const std::string interface, const std::string property,
+                   const Value& value);
+
+Cc getAllDbusProperties(Context::ptr ctx, const std::string& service,
+                        const std::string& objPath,
+                        const std::string& interface, PropertyMap& properties);
+
+template <typename Type>
+Cc getDbusProperty(Context::ptr ctx, const std::string& service,
+                   const std::string& objPath, const std::string& interface,
+                   const std::string& property, Type& propertyValue)
+{
+    auto ec = ipmi::getDbusProperty(ctx, service, objPath, interface, property,
+                                    propertyValue);
+    if (ec)
+    {
+        lg2::error(
+            "getDbusProperty for (service:{SERVICE}, path:{PATH}, interface:{INTERFACE}, property:{PROPERTY}) failed with {ERRMSG}",
+            "SERVICE", service, "PATH", objPath, "INTERFACE", interface,
+            "PROPERTY", property, "ERRMSG", ec.message());
+        return ccUnspecifiedError;
+    }
+    return ccSuccess;
+}
+
+template <typename Type>
+Cc getDbusProperty(Context::ptr ctx, const std::string& objPath,
+                   const std::string& interface, const std::string& property,
+                   Type& propertyValue)
+{
+    std::string service;
+    auto cc = iei::getService(ctx, interface, objPath, service);
+    if (cc != ccSuccess)
+    {
+        return cc;
+    }
+
+    return iei::getDbusProperty(ctx, service, objPath, interface, property,
+                                propertyValue);
+}
+
+template <typename... InputArgs>
+void callDbusMethod(ipmi::Context::ptr ctx, Cc& cc, const std::string& service,
+                    const std::string& objPath, const std::string& interface,
+                    const std::string& method, const InputArgs&... a)
+{
+    boost::system::error_code ec;
+    cc = ccSuccess;
+    ctx->bus->yield_method_call(ctx->yield, ec, service, objPath, interface,
+                                method, a...);
+    if (ec)
+    {
+        lg2::error(
+            "callDbusMethod for (service:{SERVICE}, path:{PATH}, interface:{INTERFACE}, method:{METHOD}) failed with {ERRMSG}",
+            "SERVICE", service, "PATH", objPath, "INTERFACE", interface,
+            "METHOD", method, "ERRMSG", ec.message());
+        cc = ccUnspecifiedError;
+    }
+    return;
+}
+
+template <typename RetType, typename... InputArgs>
+RetType callDbusMethod(ipmi::Context::ptr ctx, Cc& cc,
+                       const std::string& service, const std::string& objPath,
+                       const std::string& interface, const std::string& method,
+                       const InputArgs&... a)
+{
+    boost::system::error_code ec;
+    cc = ccSuccess;
+    auto rc = ctx->bus->yield_method_call<RetType>(
+        ctx->yield, ec, service, objPath, interface, method, a...);
+    if (ec)
+    {
+        lg2::error(
+            "callDbusMethod for (service:{SERVICE}, path:{PATH}, interface:{INTERFACE}, method:{METHOD}) failed with {ERRMSG}",
+            "SERVICE", service, "PATH", objPath, "INTERFACE", interface,
+            "METHOD", method, "ERRMSG", ec.message());
+        cc = ccUnspecifiedError;
+    }
+    return rc;
+}
+
+} // namespace iei
+} // namespace ipmi
