diff --git a/apps/files_external/command/import.php b/apps/files_external/command/import.php index fe27051359..28032c207b 100644 --- a/apps/files_external/command/import.php +++ b/apps/files_external/command/import.php @@ -194,8 +194,8 @@ class Import extends Base { $mount = new StorageConfig($data['mount_id']); $mount->setMountPoint($data['mount_point']); $mount->setBackend($this->getBackendByClass($data['storage'])); - $authBackends = $this->backendService->getAuthMechanismsByScheme([$data['authentication_type']]); - $mount->setAuthMechanism(current($authBackends)); + $authBackend = $this->backendService->getAuthMechanism($data['authentication_type']); + $mount->setAuthMechanism($authBackend); $mount->setBackendOptions($data['configuration']); $mount->setMountOptions($data['options']); $mount->setApplicableUsers(isset($data['applicable_users']) ? $data['applicable_users'] : []);