views:

628

answers:

1

I am planning to familiarize(read teach) myself with Silverlight by building an in-house app for managing our employees.

I, obviously, would need this to interact with Active Directory on some level.

What are my options? Has anyone tried this before?

I am currently going to explore using Services(WCF???) to do the AD interaction portion? Thoughts?

There is also this SO Post on using PowerShell to interact with AD. Maybe that is a possibility?

Thanks,


EDIT:

Too clarify what I meant by "...interact with Active Directory..." I was referring to being able to create New Users, reset they're passwords, change they're Member Of groups, etc. Not JUST authenticating through AD.

Does this make it clearer?

+3  A: 

I would recommend against using PowerShell from your app to interact with AD. PowerShell is more of a tool for admins than it is something you should use from your code. If you actually do use it from your code, then make sure it's very well abstracted away from your system.

I think using WCF to manage a large portion of this is a very good idea. Otherwise, look into RIA Services. Both give you the ability to authenticate from your Silverlight app to the services using AD accounts. And your Silverlight app can just offload the authentication to the services, as well. Once you're in your services, everything else should be taken care of for you.

Nothing definitive but this might help get you started:

Jaxidian
I think I MAY have misrepresented my goal. See my edit for clarification. In the meantime I will check out your links, thanks.
Refracted Paladin
Do the built-in Active Directory membership providers not work for you?
Jaxidian
? I am not sure what you mean? Silverlight has built in AD interaction or .Net? If you meant .Net (`System.DirectoryServices.AccountManagement`) I wasn't sure that worked in Silverlight. This will be my first, non tutorial, Silverlight app.
Refracted Paladin
No, I meant via your WCF services - those would use the AD stuff. Your Silverlight app shouldn't really do anything with AD directly - offload that to your services, that's what they're there for. Your Silverlight should simply be an empty UI shell that defers business decisions and other services to whatever is behind your WCF or RIA (or equiv) services.
Jaxidian
Ah, got it. So `WCF` or `RIA`(*a subset of WCF???*) would allow me to accomplish what I wish. *"...Silverlight...empty UI shell..."*, that is my plan. Glad to here I should be able to accomplish this through `WCF`, though this is new to me as well. Thanks
Refracted Paladin
Actually, with .NET 4.0, I think RIA Services is being thrown in under WCF, although I could be wrong on that. It was previously a separate thing. But yeah, you have it right, now. Obviously your Silverlight app will either have to take in a username/password and pass it (securely!) to your services OR just inherit the user who is running it and access your services using Windows Authentication (if it's locally on an intranet). From there, WCF/RIA can do the rest for you and Silverlight is no longer a concern.
Jaxidian