You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encountered an issue where our Bitwarden Directory Connector CLI instance was giving an unhandled server error. Upon investigation, I discovered that the employee's last name had changed, causing the employee to have a new email address.
Steps to reproduce:
Using Bitwarden Directory Connector, import users from Microsoft Entra ID
Once users have been imported, verify the external ID for a user.
Within Active Directory or Entra ID, update the user's UPN & proxy addresses
Perform another sync within Bitwarden Directory Connector
Have the new user accept the invitation
Attempt a sync with Bitwarden Directory Connector. The CLI will output an "Unhandled server error", and the desktop application will not return any errors but will not sync. Despite this, a test sync does seem to work.
To resolve, remove the invited user associated with the old email address and perform another sync. This will correct the issue.
Expected Result
Pending invitation not tied to a user should have been updated with the new email address rather than causing an unhandled server error
Actual Result
Bitwarden Directory Connector returns "Unhandled server error" when executed through the command prompt, and does not sync when using the GUI
After reviewing the errors contained within /opt/bitwarden/bwdata/logs/api/Api/, I noticed the following error:
2024-05-22 14:33:51.883 +00:00 [Error] An item with the same key has already been added. Key: {Redacted External ID}
System.ArgumentException: An item with the same key has already been added. Key: {Redacted External ID}
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Bit.Core.Services.OrganizationService.ImportAsync(Guid organizationId, Nullable`1 importingUserId, IEnumerable`1 groups, IEnumerable`1 newUsers, IEnumerable`1 removeUserExternalIds, Boolean overwriteExisting) in /home/runner/work/server/server/src/Core/AdminConsole/Services/Implementations/OrganizationService.cs:line 1772
at Bit.Api.AdminConsole.Public.Controllers.OrganizationController.Import(OrganizationImportRequestModel model) in /home/runner/work/server/server/src/Api/AdminConsole/Public/Controllers/OrganizationController.cs:line 50
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2024-05-22 14:37:26.893 +00:00 [Error] An item with the same key has already been added. Key: {Redacted External ID}
System.ArgumentException: An item with the same key has already been added. Key: {Redacted External ID}
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Bit.Core.Services.OrganizationService.ImportAsync(Guid organizationId, Nullable`1 importingUserId, IEnumerable`1 groups, IEnumerable`1 newUsers, IEnumerable`1 removeUserExternalIds, Boolean overwriteExisting) in /home/runner/work/server/server/src/Core/AdminConsole/Services/Implementations/OrganizationService.cs:line 1772
at Bit.Api.AdminConsole.Public.Controllers.OrganizationController.Import(OrganizationImportRequestModel model) in /home/runner/work/server/server/src/Api/AdminConsole/Public/Controllers/OrganizationController.cs:line 50
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Screenshots or Videos
N/A - screenshots would contain too much sensitive info. Please reference the error log listed above
I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
The text was updated successfully, but these errors were encountered:
I was able to reproduce this issue, and I have flagged this to our engineering team.
If you wish to add any further information/screenshots/recordings etc., please feel free to do so at any time - our engineering team will be happy to review these.
Steps To Reproduce
We encountered an issue where our Bitwarden Directory Connector CLI instance was giving an unhandled server error. Upon investigation, I discovered that the employee's last name had changed, causing the employee to have a new email address.
Steps to reproduce:
Expected Result
Pending invitation not tied to a user should have been updated with the new email address rather than causing an unhandled server error
Actual Result
Bitwarden Directory Connector returns "Unhandled server error" when executed through the command prompt, and does not sync when using the GUI
After reviewing the errors contained within
/opt/bitwarden/bwdata/logs/api/Api/
, I noticed the following error:Screenshots or Videos
N/A - screenshots would contain too much sensitive info. Please reference the error log listed above
Additional Context
No response
Build Version
Bitwarden Directory Connector 2024.3.2, Bitwarden 2024.5.0
Environment
Self-Hosted
Environment Details
Issue Tracking Info
The text was updated successfully, but these errors were encountered: