philbertphotos / osticket-multildap-auth-plugin

Plugin for OS Ticket that allows for authentication with multiple domains.
GNU General Public License v3.0
28 stars 17 forks source link

Active Directory/LDAP users won't create #58

Open Jan0306 opened 1 year ago

Jan0306 commented 1 year ago

Hello, i successfully installed your plugin on our osTicket install. The plugin itself tells me that the connection to our AD is OK, and even tells me "Sync completed 89 users found". So far so good.

Is it supposed to create all users after the sync? Can i check that anywhere? On the Staff Panel under Users are no AD users listed.

And when searching for a new user while creating a new ticket, the user is listed as described with "(remote)" ending. But when i click on it, it blanks all fields and i can search again. Tried it both on our existing and a fresh install.

Using Windows 10, IIS, PHP 8.0. Any idea? Thank you for your time.

dev-omrc commented 1 year ago

Check the attributes in your Domain Controller, I had a similar issue when an user is missing the email attribute

Jan0306 commented 1 year ago

@dev-omrc Hey, thanks for your answer. When exactly does it create the users? Just simply by syncing with the AD or only when a user tries to login?

dev-omrc commented 1 year ago

@dev-omrc Hey, thanks for your answer. When exactly does it create the users? Just simply by syncing with the AD or only when a user tries to login?

During user creation, if you sync or add manually, the plugin will search for your users in your AD, and it fetch some attributes of the user to register it. My configuration only takes displayName and email, but if the user in the AD doesn't have the email attribute, it happens the same behavior you are describing. Look for the attribute editor tab of the user object and check the email attribute

philbertphotos commented 1 year ago

@Jan0306 at this time it does create users it only syncs current users who logged in the system. Users are automatically created at login if they dont exist. So I can create a mechanism to import all users in a OU or something but I dont see the point.

philbertphotos commented 1 year ago

@dev-omrc that is correct I will check a few things and maybe do a video.

Jan0306 commented 1 year ago

Hey @philbertphotos and thanks for your time. So a few days ago i found out that it creates the users when the setting in "Settings - Users - Registration method" is set to public and then I try to log in. (I don't know exactly how the Settings are called because i have the german language pack installed) Should it also work in the private setting?

I don't want to set it to public, because then the users see a "register" button and i don't want anyone to register for a new account. They should simply use their domain credentials to log in and should't worry about some other credentials for the ticket system. It just makes much more sense for us internally.

A video would be great by the way. Something easy to follow. Cheers

philbertphotos commented 1 year ago

@Jan0306 I honestly pretty dam sure it worked in in private once... but that was way back in the day ... I think revisions broke it but it should be something I revisit ... personally I edited the FrontPage template so no one sees the registration button.

Jan0306 commented 1 year ago

@philbertphotos Alright thank you. It would be great if it works on private, because I'm not really a PHP guy. But I will try. Thanks!

philbertphotos commented 1 year ago

@Jan0306 right now working on code to create users via custom code if OSticket set to private.

Jan0306 commented 1 year ago

@philbertphotos Thank you!

philbertphotos commented 1 year ago

@Jan0306 ok fixed and tested Still have some stuff to clean up and have to test if on 1.17 but for not it works perfectly on 1.16

Jan0306 commented 1 year ago

@philbertphotos Thank you so much!