diff --git a/phpmyfaq/src/phpMyFAQ/Auth/AuthEntraId.php b/phpmyfaq/src/phpMyFAQ/Auth/AuthEntraId.php index 30ffe4bc63..10167cce3c 100644 --- a/phpmyfaq/src/phpMyFAQ/Auth/AuthEntraId.php +++ b/phpmyfaq/src/phpMyFAQ/Auth/AuthEntraId.php @@ -62,8 +62,15 @@ public function __construct( */ public function create(string $login, #[SensitiveParameter] string $password, string $domain = ''): mixed { + $result = false; $user = new User($this->configuration); - $result = $user->createUser($login, '', $domain); + + try { + $result = $user->createUser($login, '', $domain); + } catch (\Exception $e) { + $this->configuration->getLogger()->info($e->getMessage()); + } + $user->setStatus('active'); $user->setAuthSource(AuthenticationSourceType::AUTH_AZURE->value);