diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 91bd024..0cef7a3 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -27,6 +27,10 @@
 #include <utils/dbus_utils.hpp>
 #include <utils/json_utils.hpp>
 
+#include <optional>
+#include <string>
+#include <vector>
+
 namespace redfish
 {
 
@@ -111,6 +115,55 @@
     return "";
 }
 
+/**
+ * @brief Maps user group names retrieved from D-Bus object to
+ * Account Types.
+ *
+ * @param[in] userGroups List of User groups
+ * @param[out] res AccountTypes populated
+ *
+ * @return true in case of success, false if UserGroups contains
+ * invalid group name(s).
+ */
+inline bool translateUserGroup(const std::vector<std::string>& userGroups,
+                               crow::Response& res)
+{
+    std::vector<std::string> accountTypes;
+    for (const auto& userGroup : userGroups)
+    {
+        if (userGroup == "redfish")
+        {
+            accountTypes.emplace_back("Redfish");
+            accountTypes.emplace_back("WebUI");
+        }
+        else if (userGroup == "ipmi")
+        {
+            accountTypes.emplace_back("IPMI");
+        }
+        else if (userGroup == "ssh")
+        {
+            accountTypes.emplace_back("HostConsole");
+            accountTypes.emplace_back("ManagerConsole");
+        }
+        else if (userGroup == "web")
+        {
+            // 'web' is one of the valid groups in the UserGroups property of
+            // the user account in the D-Bus object. This group is currently not
+            // doing anything, and is considered to be equivalent to 'redfish'.
+            // 'redfish' user group is mapped to 'Redfish'and 'WebUI'
+            // AccountTypes, so do nothing here...
+        }
+        else
+        {
+            // Invalid user group name. Caller throws an excption.
+            return false;
+        }
+    }
+
+    res.jsonValue["AccountTypes"] = std::move(accountTypes);
+    return true;
+}
+
 inline void userErrorMessageHandler(
     const sd_bus_error* e, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
     const std::string& newUser, const std::string& username)
@@ -1741,8 +1794,6 @@
         asyncResp->res.jsonValue["Name"] = "User Account";
         asyncResp->res.jsonValue["Description"] = "User Account";
         asyncResp->res.jsonValue["Password"] = nullptr;
-        asyncResp->res.jsonValue["AccountTypes"] =
-            nlohmann::json::array_t({"Redfish"});
 
         for (const auto& interface : userIt->second)
         {
@@ -1818,6 +1869,25 @@
                         asyncResp->res.jsonValue["PasswordChangeRequired"] =
                             *userPasswordExpired;
                     }
+                    else if (property.first == "UserGroups")
+                    {
+                        const std::vector<std::string>* userGroups =
+                            std::get_if<std::vector<std::string>>(
+                                &property.second);
+                        if (userGroups == nullptr)
+                        {
+                            BMCWEB_LOG_ERROR
+                                << "userGroups wasn't a string vector";
+                            messages::internalError(asyncResp->res);
+                            return;
+                        }
+                        if (!translateUserGroup(*userGroups, asyncResp->res))
+                        {
+                            BMCWEB_LOG_ERROR << "userGroups mapping failed";
+                            messages::internalError(asyncResp->res);
+                            return;
+                        }
+                    }
                 }
             }
         }
