diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java index a8811e54186..add4acef72a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java @@ -100,7 +100,7 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService { CarbonContext.getThreadLocalCarbonContext().getUsername()); try { - String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser); + String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain); AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI(); List searchResults = analyticsDataAPI.search(tenantId, tableName, query,