--Update--
I've continued to look into this issue but have had little luck. The only work around I've found was to create a function which uses reflection to grab the private field that stores the password from the underlying DirectoryEntry object in the PrincipalContext, which I then use to create a new PrincipalContext with the same ...
Hey
I have the following code. I get a directory entry for a user (strpath).
And then I get the groups where the user is listed.
How can I get the number of users in each group?
DirectoryEntry myDE = new System.DirectoryServices.DirectoryEntry(strpath);
object obGroups = myDE.Invoke("Groups");
foreach (object ob in (IEnumerable)obGrou...
Greetings,
I already have a working connection to the AD and can search and retrieve information from it. I've even developed a recursive method by which one can retrieve all groups for a given user. However, I'd like to avoid the recursion if possible. One way to do this is to get the tokenGroups attribute from the AD for the user, ...
I recently had an incident where the email details of a Sharepoint user were changed in Active Directory. These changes were not transferred into SharePoint and I had a problem in one of my web parts which uses the SPUser object to get the users email address.
Is there a way to configure Sharepoint to synchronise such data automatically...
Can anyone suggest some tutorials for beginners that utilize the C# language to access Active Directory? Thanks.
...
I'm trying to remove all users from an AD group with the following code:
private void RemoveStudents() {
foreach (DirectoryEntry childDir in rootRefreshDir.Children) {
DirectoryEntry groupDE = new DirectoryEntry(childDir.Path);
for (int counter = 0; counter < groupDE.Properties["member"].Count; counter++...
Hi!
We are planning to create two sharepoint web applications using SharePoint 2010 Enterprise Edition.
All Users that have access to web app 1, should also be able to access web app 2.
This authentication shall be powered by server 2003 active directory.
--> do I need to use claims based authentication?
If so --> can I use Windows Base...
I've been investigating some cloud vendors and the ability to implement single sign-on with them, especially when it comes to AD (Active Directory) integration.
So far I've learned that with Azure this is possible through ADFS and the AppFabric Access Control offer.
In AWS, since it is possible to create a VPN and see EC2 instances as ...
Hello,
I need to check if an user exists in AD and if so, retrieve some user information. I have been able to do this as shown below. But, it is very slow. Is there any way to do this faster?
Thanks!
using System;
using System.DirectoryServices;
using System.DirectoryServices.AccountManagement;
namespace ConsoleApplication1
{
cla...
I am overriding System.IdentityModel.Policy.IAuthorizationPolicy.Evaluate as follows:
public bool Evaluate(EvaluationContext evaluationContext,ref object state)
{
var ids = (IList<IIdentity>)evaluationContext.Properties["Identities"];
var userName = ids[0].Name;
// look up "userName" in a database to check for app. permissi...
Hi:
I am trying to grapple with group management policies in a number of application and directory services (both AD and LDAP).
Can anyone refer me to online or book resource that has examples or best practices for group management?
Thanks.
...
I have a situation where I have to autheticate SharePoint user to another website that is not part of the sharepoint domain without asking user to login again.
I have sharepoint part of domain1. I have users in domain1 that log into sharepoint using NTLM by authenticating to domain1. I don't have any control over this domain and share...
What is the best way to determine if a user belongs to particular AD user group using C# without have to enumerate through all the user's groups. Can this be done using a single LDAP query or search?
...
I have CCNet setup to talk to our SVN repository, which has it's ACLs setup using Active Directory groups. This is working fine, except I'm not happy with having the user name and password of the AD user stored in plain text on the CCNet instance.
Is there a way to either encrypt the AD username/password, or get the CCNet service (I've ...
Can some post the way to know if a particular user is a deactivated user in the windows ad ?
...
I have a situation where after performing a migration-upgrade of our TFS2008 server to a new domain, I have a bunch of straggling users from the old domain that never created anything inside the 2008 server, nor need access anymore.
Does anyone know how do fully delete these old domain users from TFS2010 post-migration?
Thanks,
John
...
How do I Retrieve a list of computers in a FOLDER in a domain.
lets say i have maydomain.dom as my domain
and I have a folder containing some computers.
...
How do I access the values stored in the user attributes of Active Directory?
I'm using vc++.
...
Recently a guy from our 3rd line team thought it would be funny to delete my account from AD. This has now been re-added. Everything is back to normal apart from my Access to Sharepoint sites.
I am getting The file exists. (Exception from HRESULT: 0x80070050) Error on all sites.
After some googleing I came across a guy with the same i...
Hi! Does anyone has some example about accessing Active Directory, LDAP querying using WMI (System.Management namespace) and not System.DirectoryServices namespace.
Here on MSDN page it is described a little using CIM classes
http://msdn.microsoft.com/en-us/library/aa392320(v=VS.85).aspx
But I cant find some C# example realizing it.
...