diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java index b161c556e7c..1153cb0561f 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/src/main/java/org/wso2/carbon/device/mgt/oauth/extensions/handlers/grant/AccessTokenGrantHandler.java @@ -96,7 +96,7 @@ public class AccessTokenGrantHandler extends AbstractAuthorizationGrantHandler { } if (response != null && response.isValid()) { authStatus = true; - username = response.getUserName(); + username = response.getUserName() + "@" + response.getTenantDomain(); userTenantDomain = MultitenantUtils.getTenantDomain(username); spTenantDomain = response.getTenantDomain(); } else if (response != null && !response.isValid()) {