diff --git a/apphandler.cpp b/apphandler.cpp
index bd4b5c3..bed16ca 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -429,7 +429,7 @@
             bus, acpiObject.second, acpiObject.first, acpi_state::acpiInterface,
             acpi_state::sysACPIProp);
         auto sysACPI = acpi_state::ACPIPowerState::convertACPIFromString(
-            sysACPIVal.get<std::string>());
+            variant_ns::get<std::string>(sysACPIVal));
         res->sysACPIState =
             static_cast<uint8_t>(acpi_state::dbusToIPMI.at(sysACPI));
 
@@ -437,7 +437,7 @@
             bus, acpiObject.second, acpiObject.first, acpi_state::acpiInterface,
             acpi_state::devACPIProp);
         auto devACPI = acpi_state::ACPIPowerState::convertACPIFromString(
-            devACPIVal.get<std::string>());
+            variant_ns::get<std::string>(devACPIVal));
         res->devACPIState =
             static_cast<uint8_t>(acpi_state::dbusToIPMI.at(devACPI));
 
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index fc2ca1b..14b350e 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -34,6 +34,7 @@
 namespace ipmi
 {
 
+namespace variant_ns = sdbusplus::message::variant_ns;
 using namespace phosphor::logging;
 
 static constexpr const char* channelAccessDefaultFilename =
@@ -198,7 +199,7 @@
         if (prop.first == privilegePropertyString)
         {
             propName = privilegePropertyString;
-            intfPrivStr = prop.second.get<std::string>();
+            intfPrivStr = variant_ns::get<std::string>(prop.second);
             break;
         }
     }
@@ -1347,9 +1348,9 @@
                                       entry("INTERFACE:%s", intfName.c_str()));
                     continue;
                 }
-                intfPrivStr = variant.get<std::string>();
+                intfPrivStr = variant_ns::get<std::string>(variant);
             }
-            catch (const mapbox::util::bad_variant_access& e)
+            catch (const variant_ns::bad_variant_access& e)
             {
                 log<level::DEBUG>(
                     "exception: Network interface does not exist");
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index e90bff6..7a11ff3 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -103,6 +103,8 @@
     "priv-custom"    // PRIVILEGE_OEM - 5
 };
 
+namespace variant_ns = sdbusplus::message::variant_ns;
+
 using namespace phosphor::logging;
 using Json = nlohmann::json;
 
@@ -371,17 +373,17 @@
             std::string member = prop.first;
             if (member == userPrivProperty)
             {
-                priv = prop.second.get<std::string>();
+                priv = variant_ns::get<std::string>(prop.second);
                 userEvent = UserUpdateEvent::userPrivUpdated;
             }
             else if (member == userGrpProperty)
             {
-                groups = prop.second.get<std::vector<std::string>>();
+                groups = variant_ns::get<std::vector<std::string>>(prop.second);
                 userEvent = UserUpdateEvent::userGrpUpdated;
             }
             else if (member == userEnabledProperty)
             {
-                enabled = prop.second.get<bool>();
+                enabled = variant_ns::get<bool>(prop.second);
                 userEvent = UserUpdateEvent::userStateUpdated;
             }
             // Process based on event type.
@@ -1134,11 +1136,13 @@
         auto key = t.first;
         if (key == allPrivProperty)
         {
-            availablePrivileges = t.second.get<std::vector<std::string>>();
+            availablePrivileges =
+                variant_ns::get<std::vector<std::string>>(t.second);
         }
         else if (key == allGrpProperty)
         {
-            availableGroups = t.second.get<std::vector<std::string>>();
+            availableGroups =
+                variant_ns::get<std::vector<std::string>>(t.second);
         }
     }
     // TODO: Implement Supported Privilege & Groups verification logic
@@ -1165,15 +1169,15 @@
         std::string key = t.first;
         if (key == userPrivProperty)
         {
-            usrPriv = t.second.get<std::string>();
+            usrPriv = variant_ns::get<std::string>(t.second);
         }
         else if (key == userGrpProperty)
         {
-            usrGrps = t.second.get<std::vector<std::string>>();
+            usrGrps = variant_ns::get<std::vector<std::string>>(t.second);
         }
         else if (key == userEnabledProperty)
         {
-            usrEnabled = t.second.get<bool>();
+            usrEnabled = variant_ns::get<bool>(t.second);
         }
     }
     return;
