diff --git a/json_config.hpp b/json_config.hpp
index 3ec0c8a..04deb6b 100644
--- a/json_config.hpp
+++ b/json_config.hpp
@@ -37,7 +37,7 @@
 constexpr auto confBasePath = "/usr/share/phosphor-fan-presence";
 constexpr auto confCompatServ = "xyz.openbmc_project.EntityManager";
 constexpr auto confCompatIntf =
-    "xyz.openbmc_project.Configuration.IBMCompatibleSystem";
+    "xyz.openbmc_project.Inventory.Decorator.Compatible";
 constexpr auto confCompatProp = "Names";
 
 /**
@@ -84,10 +84,23 @@
      * Retrieve all the object paths implementing the compatible interface for
      * configuration file loading.
      */
-    static auto& getCompatObjPaths() __attribute__((pure))
+    std::vector<std::string>& getCompatObjPaths()
     {
-        static auto paths = util::SDBusPlus::getSubTreePathsRaw(
+        using SubTreeMap =
+            std::map<std::string,
+                     std::map<std::string, std::vector<std::string>>>;
+        SubTreeMap subTreeObjs = util::SDBusPlus::getSubTreeRaw(
             util::SDBusPlus::getBus(), "/", confCompatIntf, 0);
+
+        static std::vector<std::string> paths;
+        for (auto& [path, serviceMap] : subTreeObjs)
+        {
+            // Only save objects under confCompatServ
+            if (serviceMap.find(confCompatServ) != serviceMap.end())
+            {
+                paths.emplace_back(path);
+            }
+        }
         return paths;
     }
 
@@ -130,7 +143,7 @@
                 {
                     // Retrieve json config compatible relative path
                     // locations (last one found will be what's used if more
-                    // than one dbus object implementing the comptaible
+                    // than one dbus object implementing the compatible
                     // interface exists).
                     _confCompatValues =
                         util::SDBusPlus::getProperty<std::vector<std::string>>(
@@ -143,7 +156,16 @@
                     // path's compatible interface, ignore
                 }
             }
-            _loadFunc();
+            try
+            {
+                _loadFunc();
+            }
+            catch (const NoConfigFound&)
+            {
+                // The Decorator.Compatible interface is not unique to one
+                // single object on DBus so this should not be treated as a
+                // failure, wait for interfacesAdded signal.
+            }
         }
         else
         {
@@ -175,6 +197,12 @@
      */
     void compatIntfAdded(sdbusplus::message_t& msg)
     {
+        if (!_compatibleName.empty())
+        {
+            // Do not process the interfaceAdded signal if one compatible name
+            // has been successfully used to get config files
+            return;
+        }
         sdbusplus::message::object_path op;
         std::map<std::string,
                  std::map<std::string, std::variant<std::vector<std::string>>>>
@@ -239,11 +267,13 @@
             std::find_if(_confCompatValues.begin(), _confCompatValues.end(),
                          [&confFile, &appName, &fileName](const auto& value) {
             confFile = fs::path{confBasePath} / appName / value / fileName;
+            _compatibleName = value;
             return fs::exists(confFile);
         });
         if (it == _confCompatValues.end())
         {
             confFile.clear();
+            _compatibleName.clear();
         }
 
         if (confFile.empty() && !isOptional)
@@ -322,7 +352,7 @@
 
     /**
      * @brief The interfacesAdded match that is used to wait
-     *        for the IBMCompatibleSystem interface to show up.
+     *        for the Inventory.Decorator.Compatible interface to show up.
      */
     std::unique_ptr<sdbusplus::bus::match_t> _match;
 
@@ -334,6 +364,16 @@
      * interface, the last one found will be the list of compatible values used.
      */
     inline static std::vector<std::string> _confCompatValues;
+
+    /**
+     * @brief The compatible value that is currently used to load configuration
+     *
+     * The value extracted from the achieved property value list that is used
+     * as a sub-folder to append to the configuration location and really
+     * contains the configruation files
+     */
+
+    inline static std::string _compatibleName;
 };
 
 } // namespace phosphor::fan
