Adding the ability to import from Active Directory

  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Joined: Feb 11, 2004
  • Posts: 6737
  • Loc: Martinsburg, WV
  • Status: Offline

Post March 23rd, 2011, 7:40 am

At work we have this stupid application no one likes but we are forced to use. They recently updated it so we can use our domain credentials to login. The main issue I have is when we get new users. The user has to be created in the application first, this then puts the user account in Active Directory. This is stupid in my opinion. I asked about the ability to import from AD but no one seems to know how to do this. I'm not sure what language the app is written in, I'm currently trying to get that info.

So my main question, how difficult is it to add this ability? I'm sure this depends on the programming language involved. What I would like to see in the app is a button in the add user section that says import from AD and then I can just select the user account I need.

Any thoughts so I can make these programmers look stupid would be awesome.
‎"Be polite, be professional, but have a plan to kill everybody you meet." Maj. Gen. James Mattis
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 23rd, 2011, 7:40 am

  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Joined: Feb 11, 2004
  • Posts: 6737
  • Loc: Martinsburg, WV
  • Status: Offline

Post March 23rd, 2011, 7:45 am

I just found out that the app is written in C# and all data is stored in a MSSQL Database.
‎"Be polite, be professional, but have a plan to kill everybody you meet." Maj. Gen. James Mattis
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 8921
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Post March 23rd, 2011, 9:45 am

Do you have the source code for this C# program? If you don't the only other thing I can think of would be fore you to create a separate program that lets you edit the MSSQL database directly, if you have the credentials to access that.
Ozzu Hosting - Want your website on a fast server like Ozzu?
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Joined: Feb 11, 2004
  • Posts: 6737
  • Loc: Martinsburg, WV
  • Status: Offline

Post March 23rd, 2011, 9:48 am

Unfortunately I don't have the source code. I have full access to the server and database.
‎"Be polite, be professional, but have a plan to kill everybody you meet." Maj. Gen. James Mattis
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 8921
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Post March 23rd, 2011, 10:00 am

Without the source code you will not be able to modify that program. The only thing you could do is create another program that adds the functionality you are looking for and modifies the database directly. You would need to understand how the database works, and then write a script/program that imports information from ActiveDirectory, and then once you have the information you need, the script/program would update the database accordingly. Again you would need to know exactly what entries you need to add or modify in the database to complete what you are after -- so you most likely would have to study how the database works to understand what you need to do. I would probably start with looking at the database, and then once you add a user the way you are forced to now, see how the database changes. Then you would know what need to duplicate in your own program.
Ozzu Hosting - Want your website on a fast server like Ozzu?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Post March 23rd, 2011, 10:23 am

It seems bass-ackward to me. In SQL administrator under localhost (assuming that's where your database is located) on the root of localhost will be a security object which contains a login object. If the user is already created in AD, then you can go to the login object and create a new user. In the New User screen make sure Windows Authentication is checked. Then search for the new user in AD using the search option. Once you find the user you want to add, set the default database to the database for your application. The dropdown menu should be populated with all the databases under localhost. If your application does not run on localhost, you'll need to find the instance of the SQL Server where it is running on. For example, we use MS Dynamics (Great Plains) which runs in it's own SQL Server Instance. If your app works like that, then you would look for the SQL Server Instance it uses, instead of Localhost.

I think that should be all you need to do.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Joined: Feb 11, 2004
  • Posts: 6737
  • Loc: Martinsburg, WV
  • Status: Offline

Post March 23rd, 2011, 10:56 am

I'm not looking to modify the source myself. I want to show the programmers what they need to do to make it work the way it should.
‎"Be polite, be professional, but have a plan to kill everybody you meet." Maj. Gen. James Mattis
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Post March 23rd, 2011, 11:28 am

I see. That's a bit beyond what I would normally need to do. I've always done it the way I described above, but I have a small user base that changes infrequently.

I did find this
http://technet.microsoft.com/en-us/libr ... 10%29.aspx

I think that's sort of on the lines of what you want to do, but that example is doing it with VBS. I'm sure there must be a C# method that would accomplish the same thing.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: Kurthead+1 and 119 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.