mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-23 08:32:45 -05:00
[GH-ISSUE #3688] Deleting users from organisation using directory connector not working #14432
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bokkabonga on GitHub (Jul 12, 2023).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/3688
Subject of the issue
Deleting users from organisation using directory connector not working
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: INVITATION_ORG_NAME, DISABLE_2FA_REMEMBER, AUTHENTICATOR_DISABLE_TIME_DRIFT, LOG_TIMESTAMP_FORMAT, EMAIL_EXPIRATION_TIME, EMAIL_ATTEMPTS_LIMIT
Install method Docker
Clients used: Directory Connector
Reverse proxy and version: apache
MySQL/MariaDB or PostgreSQL version: mariadbsu
Other relevant details:
Steps to reproduce
Expected behaviour
After removing the user from the sync scope, the user should be removed from the organisation, when "Overwrite existing organization users based on current sync settings." is activated
Actual behaviour
The User remains in the organisation and is not removed.
Troubleshooting data
The "test now" also doesn´t list the user under "deleted Users". The logfiles also don´t show any errors
@BlackDex commented on GitHub (Jul 12, 2023):
I have tested this using LDAP, and while it also doesn't show the users under the delete option for me, it does delete the actual user which is not in the list anymore. Just make sure have the correct flags set.
Also, if it doesn't list them as deleted, you probably need to clear the previous sync cache, and if you do that, it will remove the user from the organization. It does not remove the user it self, so they can still login and access there personal vault items.
This is not something we can fix, as the actual workings on removing and adding users works just fine.
It's just that the Directory Connector does not make a call to the server to update the status until you clear the cache.
So, it's either a bug in the Directory Connector, or, as what i think a limitation of LDAP (In my case). Since i think AzureAD has some flags available to support disabeling a user, and if that flag is found, the Directory Connector will detect that also, and mark it as deletion.
It might be possible to add this feature to LDAP by configuring it in the right way. But it needs the
userAccountControlattribute.a3c8629f6d/src/services/ldap-directory.service.ts (L305-L318)And according to this page https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties#list-of-property-flags, it needs to be set to
2