diff --git a/Redfish.md b/Redfish.md
index 3739581..8d29ec0 100644
--- a/Redfish.md
+++ b/Redfish.md
@@ -676,6 +676,8 @@
 
 #### FabricAdapter
 
+- Location
+
 ### /redfish/v1/Systems/system/LogServices/
 
 #### LogServiceCollection
diff --git a/redfish-core/lib/fabric_adapters.hpp b/redfish-core/lib/fabric_adapters.hpp
index a1e273a..5cfd0b5 100644
--- a/redfish-core/lib/fabric_adapters.hpp
+++ b/redfish-core/lib/fabric_adapters.hpp
@@ -25,7 +25,7 @@
 
     if (ec.value() == boost::system::errc::io_error)
     {
-        messages::resourceNotFound(res, "#FabricAdapter.v1_0_0.FabricAdapter",
+        messages::resourceNotFound(res, "#FabricAdapter.v1_4_0.FabricAdapter",
                                    adapterId);
         return;
     }
@@ -34,18 +34,47 @@
     messages::internalError(res);
 }
 
+inline void
+    getFabricAdapterLocation(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
+                             const std::string& serviceName,
+                             const std::string& fabricAdapterPath)
+{
+    sdbusplus::asio::getProperty<std::string>(
+        *crow::connections::systemBus, serviceName, fabricAdapterPath,
+        "xyz.openbmc_project.Inventory.Decorator.LocationCode", "LocationCode",
+        [aResp](const boost::system::error_code ec,
+                const std::string& property) {
+        if (ec)
+        {
+            if (ec.value() != EBADR)
+            {
+                BMCWEB_LOG_ERROR << "DBUS response error for Location";
+                messages::internalError(aResp->res);
+            }
+            return;
+        }
+
+        aResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
+            property;
+        });
+}
+
 inline void doAdapterGet(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                          const std::string& systemName,
-                         const std::string& adapterId)
+                         const std::string& adapterId,
+                         const std::string& fabricAdapterPath,
+                         const std::string& serviceName)
 {
     aResp->res.addHeader(
         boost::beast::http::field::link,
         "</redfish/v1/JsonSchemas/FabricAdapter/FabricAdapter.json>; rel=describedby");
-    aResp->res.jsonValue["@odata.type"] = "#FabricAdapter.v1_0_0.FabricAdapter";
+    aResp->res.jsonValue["@odata.type"] = "#FabricAdapter.v1_4_0.FabricAdapter";
     aResp->res.jsonValue["Name"] = "Fabric Adapter";
     aResp->res.jsonValue["Id"] = adapterId;
     aResp->res.jsonValue["@odata.id"] = crow::utility::urlFromPieces(
         "redfish", "v1", "Systems", systemName, "FabricAdapters", adapterId);
+
+    getFabricAdapterLocation(aResp, serviceName, fabricAdapterPath);
 }
 
 inline bool checkFabricAdapterId(const std::string& adapterPath,
@@ -107,8 +136,10 @@
 
     getValidFabricAdapterPath(
         adapterId, systemName, aResp,
-        [aResp, systemName, adapterId](const std::string&, const std::string&) {
-        doAdapterGet(aResp, systemName, adapterId);
+        [aResp, systemName, adapterId](const std::string& fabricAdapterPath,
+                                       const std::string& serviceName) {
+        doAdapterGet(aResp, systemName, adapterId, fabricAdapterPath,
+                     serviceName);
         });
 }
 
