diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php
index 00366135ea4bea678af084ae4577e535b85ab98e..5d8e30b6da668cb9fff60ca7358727a69522ac74 100644
--- a/apps/files_external/lib/Config/ConfigAdapter.php
+++ b/apps/files_external/lib/Config/ConfigAdapter.php
@@ -126,7 +126,7 @@ class ConfigAdapter implements IMountProvider {
 		$this->userStoragesService->setUser($user);
 		$this->userGlobalStoragesService->setUser($user);
 
-		foreach ($this->userGlobalStoragesService->getUniqueStorages() as $storage) {
+		foreach ($this->userGlobalStoragesService->getAllStoragesForUser() as $storage) {
 			try {
 				$this->prepareStorageConfig($storage, $user);
 				$impl = $this->constructStorage($storage);
@@ -147,35 +147,26 @@ class ConfigAdapter implements IMountProvider {
 				$impl = new FailedStorage(['exception' => $e]);
 			}
 
-			$mount = new MountPoint(
-				$impl,
-				'/' . $user->getUID() . '/files' . $storage->getMountPoint(),
-				null,
-				$loader,
-				$storage->getMountOptions(),
-				$storage->getId()
-			);
-			$mounts[$storage->getMountPoint()] = $mount;
-		}
-
-		foreach ($this->userStoragesService->getStorages() as $storage) {
-			try {
-				$this->prepareStorageConfig($storage, $user);
-				$impl = $this->constructStorage($storage);
-			} catch (\Exception $e) {
-				// propagate exception into filesystem
-				$impl = new FailedStorage(['exception' => $e]);
+			if ($storage->getType() === StorageConfig::MOUNT_TYPE_PERSONAl) {
+				$mount = new PersonalMount(
+					$this->userStoragesService,
+					$storage->getId(),
+					$impl,
+					'/' . $user->getUID() . '/files' . $storage->getMountPoint(),
+					null,
+					$loader,
+					$storage->getMountOptions()
+				);
+			} else {
+				$mount = new MountPoint(
+					$impl,
+					'/' . $user->getUID() . '/files' . $storage->getMountPoint(),
+					null,
+					$loader,
+					$storage->getMountOptions(),
+					$storage->getId()
+				);
 			}
-
-			$mount = new PersonalMount(
-				$this->userStoragesService,
-				$storage->getId(),
-				$impl,
-				'/' . $user->getUID() . '/files' . $storage->getMountPoint(),
-				null,
-				$loader,
-				$storage->getMountOptions()
-			);
 			$mounts[$storage->getMountPoint()] = $mount;
 		}
 
diff --git a/apps/files_external/lib/Service/DBConfigService.php b/apps/files_external/lib/Service/DBConfigService.php
index 61cca9a0224b7028e2655841f29e0aaef18ea840..00612d17643d3c85053892b3cd4edc60a072000f 100644
--- a/apps/files_external/lib/Service/DBConfigService.php
+++ b/apps/files_external/lib/Service/DBConfigService.php
@@ -89,6 +89,29 @@ class DBConfigService {
 		return $this->getMountsFromQuery($query);
 	}
 
+	public function getMountsForUser($userId, $groupIds) {
+		$builder = $this->connection->getQueryBuilder();
+		$query = $builder->select(['m.mount_id', 'mount_point', 'storage_backend', 'auth_backend', 'priority', 'm.type'])
+			->from('external_mounts', 'm')
+			->innerJoin('m', 'external_applicable', 'a', $builder->expr()->eq('m.mount_id', 'a.mount_id'))
+			->where($builder->expr()->orX(
+				$builder->expr()->andX( // global mounts
+					$builder->expr()->eq('a.type', $builder->createNamedParameter(self::APPLICABLE_TYPE_GLOBAL, IQueryBuilder::PARAM_INT)),
+					$builder->expr()->isNull('a.value')
+				),
+				$builder->expr()->andX( // mounts for user
+					$builder->expr()->eq('a.type', $builder->createNamedParameter(self::APPLICABLE_TYPE_USER, IQueryBuilder::PARAM_INT)),
+					$builder->expr()->eq('a.value', $builder->createNamedParameter($userId))
+				),
+				$builder->expr()->andX( // mounts for group
+					$builder->expr()->eq('a.type', $builder->createNamedParameter(self::APPLICABLE_TYPE_GROUP, IQueryBuilder::PARAM_INT)),
+					$builder->expr()->in('a.value', $builder->createNamedParameter($groupIds, IQueryBuilder::PARAM_INT_ARRAY))
+				)
+			));
+
+		return $this->getMountsFromQuery($query);
+	}
+
 	/**
 	 * Get admin defined mounts
 	 *
diff --git a/apps/files_external/lib/Service/UserGlobalStoragesService.php b/apps/files_external/lib/Service/UserGlobalStoragesService.php
index c22508e57c4f4ecd573dad04f4c8b8d987ed87a0..355401bb84fc2f92d303da0c6fd7fffbd10ceb3d 100644
--- a/apps/files_external/lib/Service/UserGlobalStoragesService.php
+++ b/apps/files_external/lib/Service/UserGlobalStoragesService.php
@@ -172,4 +172,29 @@ class UserGlobalStoragesService extends GlobalStoragesService {
 		}
 		return false;
 	}
+
+
+	/**
+	 * Gets all storages for the user, admin, personal, global, etc
+	 *
+	 * @return StorageConfig[] array of storage configs
+	 */
+	public function getAllStoragesForUser() {
+		if (is_null($this->getUser())) {
+			return [];
+		}
+		$groupIds = $this->groupManager->getUserGroupIds($this->getUser());
+		$mounts = $this->dbConfig->getMountsForUser($this->getUser()->getUID(), $groupIds);
+		$configs = array_map([$this, 'getStorageConfigFromDBMount'], $mounts);
+		$configs = array_filter($configs, function ($config) {
+			return $config instanceof StorageConfig;
+		});
+
+		$keys = array_map(function (StorageConfig $config) {
+			return $config->getId();
+		}, $configs);
+
+		$storages = array_combine($keys, $configs);
+		return array_filter($storages, [$this, 'validateStorage']);
+	}
 }