diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java index 24e4146ce958..46487e01080e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java @@ -6275,8 +6275,8 @@ public Application getApplicationByName(String applicationName, String userId, S prepStmt = fillQueryParams(connection, query, groupIds, 1); prepStmt.setString(++parameterIndex, tenantDomain); - prepStmt.setString(++parameterIndex, userId); prepStmt.setString(++parameterIndex, tenantDomain + '/' + groupId); + prepStmt.setString(++parameterIndex, userId); prepStmt.setString(++parameterIndex, applicationName); } else { if (forceCaseInsensitiveComparisons) {