@@ -46,7 +46,7 @@ import { TenantInfo } from "@wso2is/admin.tenants.v1/models/tenant";
4646import { getAssociationType } from "@wso2is/admin.tenants.v1/utils/tenants" ;
4747import { ProfileConstants } from "@wso2is/core/constants" ;
4848import { IdentityAppsApiException } from "@wso2is/core/exceptions" ;
49- import { getUserNameWithoutDomain } from "@wso2is/core/helpers" ;
49+ import { getUserNameWithoutDomain , resolveUserstore } from "@wso2is/core/helpers" ;
5050import {
5151 AlertInterface ,
5252 AlertLevels ,
@@ -218,6 +218,8 @@ export const UserProfile: FunctionComponent<UserProfilePropsInterface> = (
218218 ) ;
219219 const userSchemaURI : string = useSelector ( ( state : AppState ) => state ?. config ?. ui ?. userSchemaURI ) ;
220220 const featureConfig : FeatureConfigInterface = useSelector ( ( state : AppState ) => state . config . ui . features ) ;
221+ const primaryUserStoreDomainName : string = useSelector ( ( state : AppState ) =>
222+ state ?. config ?. ui ?. primaryUserStoreDomainName ) ;
221223
222224 const hasUsersUpdatePermissions : boolean = useRequiredScopes (
223225 featureConfig ?. users ?. scopes ?. update
@@ -2801,6 +2803,7 @@ export const UserProfile: FunctionComponent<UserProfilePropsInterface> = (
28012803 setIsSubmitting ( true ) ;
28022804
28032805 const resolvedUsername : string = getUserNameWithoutDomain ( user ?. userName ) ;
2806+ const userStoreDomain : string = resolveUserstore ( user ?. userName , primaryUserStoreDomainName ) ;
28042807
28052808 const requestData : ResendCodeRequestData = {
28062809 properties : [
@@ -2810,7 +2813,7 @@ export const UserProfile: FunctionComponent<UserProfilePropsInterface> = (
28102813 }
28112814 ] ,
28122815 user : {
2813- realm : user [ SCIMConfigs . scim . systemSchema ] ?. userSource ,
2816+ realm : userStoreDomain ,
28142817 username : resolvedUsername
28152818 }
28162819 } ;
0 commit comments