diff --git a/dbus_interfaces_finder.cpp b/dbus_interfaces_finder.cpp
new file mode 100644
index 0000000..31e5023
--- /dev/null
+++ b/dbus_interfaces_finder.cpp
@@ -0,0 +1,107 @@
+/**
+ * Copyright © 2024 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "dbus_interfaces_finder.hpp"
+
+#include <algorithm>
+#include <exception>
+#include <map>
+#include <utility>
+
+namespace phosphor::power::util
+{
+
+DBusInterfacesFinder::DBusInterfacesFinder(
+    sdbusplus::bus_t& bus, const std::string& service,
+    const std::vector<std::string>& interfaces, Callback callback) :
+    bus{bus},
+    service{service}, interfaces{interfaces}, callback{std::move(callback)},
+    match{bus,
+          sdbusplus::bus::match::rules::interfacesAdded() +
+              sdbusplus::bus::match::rules::sender(service),
+          std::bind(&DBusInterfacesFinder::interfacesAddedCallback, this,
+                    std::placeholders::_1)}
+{
+    findInterfaces();
+}
+
+void DBusInterfacesFinder::interfacesAddedCallback(
+    sdbusplus::message_t& message)
+{
+    // Exit if message is invalid
+    if (!message)
+    {
+        return;
+    }
+
+    try
+    {
+        // Read the D-Bus message
+        sdbusplus::message::object_path path;
+        std::map<std::string, std::map<std::string, util::DbusVariant>>
+            interfaces;
+        message.read(path, interfaces);
+
+        // Call callback for interfaces that we are looking for
+        for (const auto& [interface, properties] : interfaces)
+        {
+            if (std::ranges::contains(this->interfaces, interface))
+            {
+                callback(path, interface, properties);
+            }
+        }
+    }
+    catch (const std::exception&)
+    {
+        // Error trying to read InterfacesAdded message.  One possible cause
+        // could be a property whose value is an unexpected data type.
+    }
+}
+
+void DBusInterfacesFinder::findInterfaces()
+{
+    try
+    {
+        // Use ObjectMapper to find interface instances that already exist
+        auto objects = util::getSubTree(bus, "/", interfaces, 0);
+
+        // Search for matching interfaces in returned objects
+        for (const auto& [path, services] : objects)
+        {
+            for (const auto& [service, interfaces] : services)
+            {
+                if (service == this->service)
+                {
+                    for (const auto& interface : interfaces)
+                    {
+                        if (std::ranges::contains(this->interfaces, interface))
+                        {
+                            auto properties = util::getAllProperties(
+                                bus, path, interface, service);
+                            callback(path, interface, properties);
+                        }
+                    }
+                }
+            }
+        }
+    }
+    catch (const std::exception&)
+    {
+        // Interface instances might not be available yet
+    }
+}
+
+} // namespace phosphor::power::util
diff --git a/dbus_interfaces_finder.hpp b/dbus_interfaces_finder.hpp
new file mode 100644
index 0000000..35a80c7
--- /dev/null
+++ b/dbus_interfaces_finder.hpp
@@ -0,0 +1,128 @@
+/**
+ * Copyright © 2024 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+#include "utility.hpp"
+
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/bus/match.hpp>
+
+#include <functional>
+#include <string>
+#include <vector>
+
+namespace phosphor::power::util
+{
+
+/**
+ * @class DBusInterfacesFinder
+ *
+ * Class that finds instances of one or more D-Bus interfaces.
+ *
+ * A D-Bus service name and one or more D-Bus interfaces are specified in the
+ * constructor.  The class finds instances of those interfaces that are owned by
+ * the service.
+ *
+ * The class finds the instances using two different methods:
+ * - Registers an InterfacesAdded listener for the specified service.  Class is
+ *   notified when a new interface instance is created on D-Bus.
+ * - Queries the ObjectMapper to find interface instances that already exist.
+ *
+ * Utilizing both methods allows this class to be used before, during, or after
+ * the service has created the interface instances.
+ *
+ * When an interface instance is found, the callback function specified in the
+ * constructor is called.  This function will be called multiple times if
+ * multiple instances are found.
+ */
+class DBusInterfacesFinder
+{
+  public:
+    // Specify which compiler-generated methods we want
+    DBusInterfacesFinder() = delete;
+    DBusInterfacesFinder(const DBusInterfacesFinder&) = delete;
+    DBusInterfacesFinder(DBusInterfacesFinder&&) = delete;
+    DBusInterfacesFinder& operator=(const DBusInterfacesFinder&) = delete;
+    DBusInterfacesFinder& operator=(DBusInterfacesFinder&&) = delete;
+    ~DBusInterfacesFinder() = default;
+
+    /**
+     * Callback function that is called when an interface instance is found.
+     *
+     * @param path D-Bus object path that implements the interface
+     * @param interface D-Bus interface that was found
+     * @param properties Properties of the D-Bus interface
+     */
+    using Callback = std::function<void(const std::string& path,
+                                        const std::string& interface,
+                                        const DbusPropertyMap& properties)>;
+
+    /**
+     * Constructor.
+     *
+     * @param bus D-Bus bus object
+     * @param service D-Bus service that owns the object paths implementing
+     *                the specified interfaces
+     * @param interfaces D-Bus interfaces to find
+     * @param callback Callback function that is called each time an interface
+     *                 instance is found
+     */
+    explicit DBusInterfacesFinder(sdbusplus::bus_t& bus,
+                                  const std::string& service,
+                                  const std::vector<std::string>& interfaces,
+                                  Callback callback);
+
+    /**
+     * Callback function to handle InterfacesAdded D-Bus signals
+     *
+     * @param message Expanded sdbusplus message data
+     */
+    void interfacesAddedCallback(sdbusplus::message_t& message);
+
+  private:
+    /**
+     * Finds any interface instances that already exist on D-Bus.
+     */
+    void findInterfaces();
+
+    /**
+     * D-Bus bus object.
+     */
+    sdbusplus::bus_t& bus;
+
+    /**
+     * D-Bus service that owns the object paths implementing the interfaces.
+     */
+    std::string service;
+
+    /**
+     * D-Bus interfaces to find.
+     */
+    std::vector<std::string> interfaces;
+
+    /**
+     * Callback function that is called each time an interface instance is
+     * found.
+     */
+    Callback callback;
+
+    /**
+     * Match object for InterfacesAdded signals.
+     */
+    sdbusplus::bus::match_t match;
+};
+
+} // namespace phosphor::power::util
diff --git a/meson.build b/meson.build
index 7d5dd11..bc0f16f 100644
--- a/meson.build
+++ b/meson.build
@@ -154,6 +154,7 @@
     'power',
     error_cpp,
     error_hpp,
+    'dbus_interfaces_finder.cpp',
     'gpio.cpp',
     'pmbus.cpp',
     'temporary_file.cpp',
