diff --git a/utils.cpp b/utils.cpp
index 2e6c5e7..d81bf76 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -276,6 +276,51 @@
     }
 }
 
+ObjectTree getAllAncestors(sdbusplus::bus::bus& bus,
+                           const std::string& path,
+                           InterfaceList&& interfaces)
+{
+    auto convertToString = [](InterfaceList& interfaces) -> std::string
+    {
+        std::string intfStr;
+        for (const auto& intf : interfaces)
+        {
+            intfStr += "," + intf;
+        }
+        return intfStr;
+    };
+
+    auto mapperCall = bus.new_method_call(MAPPER_BUS_NAME,
+                                          MAPPER_OBJ,
+                                          MAPPER_INTF,
+                                          "GetAncestors");
+    mapperCall.append(path, interfaces);
+
+    auto mapperReply = bus.call(mapperCall);
+    if (mapperReply.is_method_error())
+    {
+        log<level::ERR>("Error in mapper call",
+                        entry("PATH=%s", path.c_str()),
+                        entry("INTERFACES=%s",
+                            convertToString(interfaces).c_str()));
+
+        elog<InternalFailure>();
+    }
+
+    ObjectTree objectTree;
+    mapperReply.read(objectTree);
+
+    if (objectTree.empty())
+    {
+        log<level::ERR>("No Object has impelmented the interface",
+                        entry("PATH=%s", path.c_str()),
+                        entry("INTERFACES=%s",
+                            convertToString(interfaces).c_str()));
+        elog<InternalFailure>();
+    }
+
+    return objectTree;
+}
 
 namespace method_no_args
 {
