public function switchOrganization(User $user, OrganizationInterface $organization)
    {
        $role = $this->getOrganizationRole($user, $organization);

        if ($role == false && !$this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) {
            throw new NotFoundHttpException('Roles in organization not found');
        }

        $userRoles = $this->removeOrganizationRoles($user->getRoles());

        $user->setRoles(array_merge($userRoles, $role->getroles()));
        $user->setActiveOrganization($organization);
        $user->setActiveRole($role);

        $this->dm->persist($user);
        $this->dm->flush();

        $token = new \Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken(
            $user,
            null,
            'main',
            $user->getRoles()
        );

        $this->tokenStorage->setToken($token);
        $this->userProvider->refreshUser($user);
    }