Link customer users to exchange server

Moderator: crythias

Post Reply
puree
Znuny newbie
Posts: 11
Joined: 15 Dec 2020, 23:24
Znuny Version: 6.0
Real Name: Mo Knk

Link customer users to exchange server

Post by puree »

Hello,

Is there a possibility to sync customer users with our company exchange server?
The alternative is adding users manually.

Kind Regards,
Puree
root
Administrator
Posts: 3963
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Link customer users to exchange server

Post by root »

Hi,

If you're talking about regular active directory user: yes, use the CustomerUser backend LDAP. This is a live access, syncing is available with an existing script but I wouldn't recommend this.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
puree
Znuny newbie
Posts: 11
Joined: 15 Dec 2020, 23:24
Znuny Version: 6.0
Real Name: Mo Knk

Re: Link customer users to exchange server

Post by puree »

Hello,

I'm having some issues with making this work as I'm quite new with this stuff.
Right now i have this:

Code: Select all

# CustomerUser
# (customer ldap backend and settings)
$Self->{CustomerUser} = {
    Name => 'LDAP Data Source',
    Module => 'Kernel::System::CustomerUser::LDAP',
    Params => {
        # ldap host
        Host => 'src-dc01.******.local',
        # ldap base dn
        BaseDN => 'dc=*****,dc=local',
        # search scope (one|sub)
        SSCOPE => 'sub',
        # The following is valid but would only be necessary if the
        # anonymous user does NOT have permission to read from the LDAP tree
        UserDN => '',
        UserPw => '',
        # in case you want to add always one filter to each ldap query, use
        # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
        AlwaysFilter => '',
            # if the charset of your ldap server is iso-8859-1, use this:
#            SourceCharset => 'iso-8859-1',

            # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
            Params => {
                port => 389,
                timeout => 120,
                async => 0,
                version => 3,
            },
    },
    # customer unique id
    CustomerKey => 'uid',
    # customer #
    CustomerID => 'mail',
    CustomerUserListFields => ['cn', 'mail'],
    CustomerUserSearchFields => ['uid', 'cn', 'mail'],
    CustomerUserSearchPrefix => '',
    CustomerUserSearchSuffix => '*',
    CustomerUserSearchListLimit => 250,
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenname', 'sn'],
    # show not own tickets in customer panel, CompanyTickets
    CustomerUserExcludePrimaryCustomerID => 0,
    # add an ldap filter for valid users (expert setting)
#    CustomerUserValidFilter => '(!(description=locked))',
    # administrator can't change customer preferences
    AdminSetPreferences => 0,
#    # cache time to live in sec. - cache any database queries
#    CacheTTL => 0,
    Map => [
        # note: Login, Email and CustomerID are mandatory!
        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
        [ 'UserTitle',      'Title',      'title',           1, 0, 'var', '', 0 ],
        [ 'UserFirstname',  'Firstname',  'givenname',       1, 1, 'var', '', 0 ],
        [ 'UserLastname',   'Lastname',   'sn',              1, 1, 'var', '', 0 ],
        [ 'UserLogin',      'Username',   'uid',             1, 1, 'var', '', 0 ],
        [ 'UserEmail',      'Email',      'mail',            1, 1, 'var', '', 0 ],
        [ 'UserCustomerID', 'CustomerID', 'mail',            0, 1, 'var', '', 0 ],
#        [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
        [ 'UserPhone',      'Phone',      'telephonenumber', 1, 0, 'var', '', 0 ],
        [ 'UserAddress',    'Address',    'postaladdress',   1, 0, 'var', '', 0 ],
        [ 'UserComment',    'Comment',    'description',     1, 0, 'var', '', 0 ],
    ],
};
I keep getting this error:

error OTRS-CGI-42 Can't connect to srv-dc01.*****.local: Name or service not known

This machine is in the same network but is not in the domain. Does that possibly cause issues aswell?

Kind regards,
Puree
root
Administrator
Posts: 3963
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Link customer users to exchange server

Post by root »

Hi,

Can't connect could also mean the requested port is not open/available etc. Ask your domain administrator which port and protocoll to use for LDAP connections.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
puree
Znuny newbie
Posts: 11
Joined: 15 Dec 2020, 23:24
Znuny Version: 6.0
Real Name: Mo Knk

Re: Link customer users to exchange server

Post by puree »

root wrote: 11 Mar 2021, 16:13 Hi,

Can't connect could also mean the requested port is not open/available etc. Ask your domain administrator which port and protocoll to use for LDAP connections.

- Roy
I checked the ldap port and it's 389 aswell.
root
Administrator
Posts: 3963
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Link customer users to exchange server

Post by root »

Hi,

Your configurations show the setting

Code: Select all

Host => 'src-dc01.******.local',
Maybe it's srv-dc01?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
puree
Znuny newbie
Posts: 11
Joined: 15 Dec 2020, 23:24
Znuny Version: 6.0
Real Name: Mo Knk

Re: Link customer users to exchange server

Post by puree »

Hello,

Yes it was srv-dc01, thank you.
However it is still giving the same error.

Kind regards
Puree
puree
Znuny newbie
Posts: 11
Joined: 15 Dec 2020, 23:24
Znuny Version: 6.0
Real Name: Mo Knk

Re: Link customer users to exchange server

Post by puree »

Is there perhaps a way to link customer users to azure active directory instead or import a csv file to create the users?

Kind regards,
Puree
Post Reply