Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Integrate osTicket to my domain CSRF Token generate

Hello and nice to be here!
I have to ask sorry for my poor english and also I am new to web development etc!

Well to the problem, I have installed osticket and made all the changes to work right, but there is still one problem.
The login action for the users I need it to be done from my main domain and not from the log in page of the newly installed osticket ( which is

I've made a form to with the same info as the one to the login.php-osticket form, example of my form:
<form action="" method="post">
Username: <input id="luser" name="luser" type="text">
Password: <input id="lpasswd" name="lpasswd" type="password">
the name value for Username input and password input are the one that the osticket DB asks for value, but there is also one third filled that is hidden, which is CSRF Token, the CSRF Token is my problem, I don't know how to generate it and post it with the username and password from to
Any help there?
I give a try to this solution but I had no luck, maybe I made some mistakes because I don't have experience because I am new to web development - the "Next try to run the script.  You can do this by putting the script on a
web server and browsing to it. [note: the webserver will need to have
the IP address that you put in the API key!" from the above link, I don't know how to do it and maybe this is my mistake, anyway don't be harsh at me (:

Thank you in advance.


  • It sounds to me like you would want to setup Authentication: LDAP and AD as well as Authentication:: HTTP Pass-through as described here:

    The ticket API is for making tickets.
  • Hello again, I installed LDAP and as I was doing test, I am not anymore able to login as admin the first time I put my admin username and passwords the login.php redirects me to an empty HTML page and if I resend the page it displays Valid CSRF Token Required
  • It's likely authenticating against AD.... .and expecting the AD password.

    Can you run SQL queries?
    If so then try changing the ost_staff table, by updating the backend column for the admin user to local.
  • edited June 2017
    Hello again,

    I've left the osTicket from March till now, because I had no time to configure it.

    But now I have time and I want to make it work! :)
    The LDAP Authentication and Lookup configuration is this one:

    Default Domain:
    DNS Servers:
    LDAP servers: (Here I put my name server)
    Search User:\someAdminUser
    Password: password for the above user
    Search Base: OU=All_Users,DC=support,,DC=local
    LDAP Schema: Microsoft Active Directory
    Staff Authentication: checked
    Client Authentication: checked

    But I still cann't connect through my connect form witch is located at ( when I press submit it redirects me to the and I get this error "Invalid CSRF token" ).

    I'm using osticket on an ubuntu 16.04 Server with plesk on it.
    The osticket has been installed as an plesk extension.

    What am I missing here or doing it wrong?

    Thank you in advance.
  • Reviewing this here are the things I see that are different from mine or made me pause for a second.  Over all it looks good to me.

    LDAP servers I use IP addresses personally.

    Search user: instead of the FQD corp.domain.local\username I use domain\username.

    Search base... your is identical to mine. Do you actually have an OU called "ALL_USERS"?  because I am pretty sure that was an OU that I created. 
  • excuse me for this question, OU means Owner User? if yes, then no I don't have a user called All_users, and it was silly from me.
    I will give it a try today again and I will keep updating the post!
  • Organizational Unit - It's an active directory container, OUs are the only folders you can apply group policies to in AD.
Sign In or Register to comment.