0
i.ullah@fandaqah.com created
Need to assign user to the tenant but didn't find option to assign user to any tenant. kindly guide.
- ABP Framework version: v8.0.5
- UI Type: Angular
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
1 Answer(s)
-
0
hi
The tenant(
TenantId
) is set when a user is created.https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs#L165
- There may be some related user data, so you can delete a user and re-create a new user with a specific
tenant
- You can change the
TenantId
of auser
byObjectHelper
var user = await UserManager.GetByIdAsync ObjectHelper.TrySetProperty(user, x => x.TenantId, () => NewTenantId);
- There may be some related user data, so you can delete a user and re-create a new user with a specific