I am not able to understand why creating group in active directory as "local" for groupType doesnt work. it throws following exception : System.DirectoryServices.DirectoryServicesCOMException (0x80072035): The server is unwilling to process the request. while following is the code sample : var parentEntry = new DirectoryEntry(ParentContainer); var groupToCreate = parentEntry.Children.Add(this.AttributeType + [...] read more
We have written an authentication provider for a SharePoint web application which can requests multiple LDAP directories. One of the LDAP server have to be requested via SSL. So we imported the CA certificate which was used to sign the LDAP server's certificate into the certificate store of the SharePoint [...] read more
I am using a WCF service to expose certain Active Directory management functions to our help desk staff without giving them the group membership required to manipulate AD directly. Adding users to and removing users from groups is working like a champ with existing users, but every time I create [...] read more
Using any .NET framework I am able to create security groups, however when I try to add users from within the same domain I get an error. Using System.DirectoryServices.AccountManagement: TheGroup = GroupPrincipal.FindByIdentity(SecurityContext, "GROUPNAME") TheGroup.Members.Add(SecurityContext, IdentityType.SamAccountName, "username") TheGroup.Save() Everything works for creating, and getting an existing group. Also adding the members [...] read more
I am trying to read an XML file with user information and based on that information I want to add users to Active Directory groups. I have been looking up the error messages with no help so far. Here is the add user to group code: $MyUsers = [xml] (Get-Content [...] read more
I'm getting stuck with creating Active Directory User with C# this is my code use to create a new user: public bool CreateUser(string userName, string password) { try { DirectoryEntry entry = new DirectoryEntry(lDAPConnectionString, aDConnectionUserName, aDConnectionPassword, AuthenticationTypes.Secure); // Use the Add method to add a user to an organizational unit. [...] read more
Here is my script: # get distinguished name $grpDN = (Get-QADGroup mw\AAA).dn $UsrDN = (Get-QADUser sw\tx116).dn # using Remove-QADGroupMember Remove-QADGroupMember -Identity $grpDN -Member $UsrDN Here is the error: > Remove-QADGroupMember : The server is unwilling to process the request. > (Exception from HRESULT: 0x80072035) I also tried to use Remove-AdgroupMember [...] read more
My script looks like this: $Users = Import-Csv "C:\users.csv" foreach ($User in $Users) { New-QADUser -Name $User.Name ` -ParentContainer $User.OU ` -FirstName $User.FirstName ` -LastName $User.LastName ` -UserPassword $User.userPassword ` -SamAccountName $User.sAMAccountName ` } When I run it I get the following error: DefaultNamingContext Type -------------------- ---- DC=example,DC=domain,DC=org ActiveDirectory The [...] read more
I try to set the user password like this: user.Invoke("SetPassword", password); But I get an exception > The server is unwilling to process the request. (Exception from HRESULT: > 0x80072035) > > 0000052D: SvcErr: DSID-031A129B, problem 5003 (WILL_NOT_PERFORM), data 0 Sounds familiar to someone? read more
When I try to unlock an AD account using my own C# program, I get the following error: > System.DirectoryServices.DirectoryServicesCOMException (0x80072035): The > server is unwilling to process the request. This is the code I use to unlock the account: // "ldap" is an instance of my own class for [...] read more