Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frends.LDAP.AddUserToGroups - Exception when adding user to empty group in Active Directory #19

Open
tm-sk opened this issue Apr 23, 2024 · 1 comment

Comments

@tm-sk
Copy link

tm-sk commented Apr 23, 2024

Description
Task throws exception when adding user to an empty group in Active Directory.

Example result:

ClassName
System.Exception
Message
AddUserToGroups error: System.Collections.Generic.KeyNotFoundException: The given key 'member' was not present in the dictionary.
at Frends.LDAP.AddUserToGroups.LDAP.UserExistsInGroup(LdapConnection connection, String userDn, String groupDn, CancellationToken cancellationToken)
at Frends.LDAP.AddUserToGroups.LDAP.AddUserToGroups(Input input, Connection connection, CancellationToken cancellationToken)
StackTraceString
at Frends.LDAP.AddUserToGroups.LDAP.AddUserToGroups(Input input, Connection connection, CancellationToken cancellationToken)
at Frends.ExecutableProcess.frends_FrendsTemp.frends_FrendsTemp.Execute(Object triggerDetails, Object environmentVariables, Object processVariables, Object process, CancellationToken cancellationToken, Func`3 executeSubprocessAsync, Func`3 executeSharedStateCommandAsync, LogLevel logLevel) in Frends.ExecutableProcess.frends_FrendsTemp.cs:line 58
InnerException
null


To reproduce

  1. Have empty group in Active Directory
  2. Run task to add user to the empty group
  3. 😟

Workaround
Add a member to the group by a different means. Task appears to function as long as "member" attribute is not empty.

@tm-sk
Copy link
Author

tm-sk commented Apr 23, 2024

Forgot to mention: task version is 1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant