Adding the ability to import from Active Directory

  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

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.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

I just found out that the app is written in C# and all data is stored in a MSSQL Database.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

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.
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

Unfortunately I don't have the source code. I have full access to the server and database.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 105 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.