Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Find out what Organization Unit a user is member of #5823


User avatar
0
larsfk created

Hi!

Is there a way to find out which organization unit a user is member of? Or do you have to loop through all units and check if the user is in one of the units?

Thanks :)


1 Answer(s)
  • User Avatar
    1
    aaron created
    Support Team
    var organizationUnitIdsOfUser = _userOrganizationUnitRepository.GetAll()
        .Where(uou => uou.UserId == input.UserId)
        .Select(uou => uou.OrganizationUnitId);