Skip to content

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

@tm-sk

Description

@tm-sk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions