Questions tagged [account-management]

116 questions
3
votes
1 answer

Handling the C2DM error ACCOUNT_MISSING in Android

The registration for C2DM may result in an error ACCOUNT_MISSING. This error must be handled, according to the documentation, in this way "The application should ask the user to open the account manager and add a Google account." I would like to…
3
votes
1 answer

Improving performance of System.DirectoryServices.AccountManagement

I have a program that will let me manage users on our terminal server that we use to demo our software. I have been trying to improve the performace of adding users to the system (It adds the main account then it adds sub accounts if needed, for…
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
3
votes
1 answer

Get groups a user belongs to for both local and domain accounts

I'm trying to list all the groups that a given user belongs to, and I want to support both local machine accounts and domain accounts. I can get the groups for domain accounts with the following code: public void ListAllGroupsDomain() { …
Gillfish
  • 717
  • 1
  • 9
  • 29
3
votes
1 answer

How to set a binary attribute when using a AccountManagement Extension Class?

I am using a custom class to expose some custom schema in Active Directory. I am storing a binary blob, per the project requirements this data must be stored in the AD, I can not use a external store (I would if I could). When I create the user it…
3
votes
1 answer

Frontend for WCF Service

I have to make a rather big design decision and would like to ask for some advices from experienced people. I am developing a SOA service using WCF (includes Login + user account management, customer databases, presentation of different product…
Cleo
  • 93
  • 1
  • 2
  • 9
3
votes
0 answers

GroupPrincipal.FindByIdentity error

I have a .NET 3.5 method that, given a user and a list of Active Directory groups, returns the subset of groups that the user belongs to. The code works at dozens of installations, but fails at one particular customer site. The code looks like…
Mark Woodard
  • 51
  • 1
  • 8
2
votes
1 answer

The authentication mechanism is unknown

I am accessing user information from active directory. My code is working well on my local PC (having windows xp, not on domain). The code is PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "domainName",…
2
votes
2 answers

Retrieve AD Custom Attribute in One Batch

Is it possible to use the System.DirectoryServices.AccountManagement library and the PrincipalSearcher class to retrieve a custom attribute for all Principals returned from the call to FindAll()? I'm currently using this example:…
Chris
  • 2,959
  • 1
  • 30
  • 46
2
votes
1 answer

What is "Name" in "IdentityType" (System.DirectoryServices.AccountManagement)

I want to search a user with "Display Name". I come across FindByIdentity function and it can search with below IdentityTypes: DistinguishedName 3 The identity is a Distinguished Name (DN). Guid 5 The identity is a Globally Unique Identifier…
Mark
  • 283
  • 3
  • 22
2
votes
4 answers

C# Active Directory Invoke "ChangePassword" cannot contact domain

I have the following code as part of a web application for my Active Directory users to be able to update their passwords (for active directory and gmail at the same time). I am using C# with System.DirectoryServices.AccountManagement. This code…
2
votes
1 answer

Users management on remote Windows server using C# System.DirectoryServices

I've written a program which opens a connection to a remote Windows server in order to manage local accounts (not Active directory). The program executes the following steps: User Creation Add the user to a group Both methods use…
adun
  • 191
  • 1
  • 2
  • 8
2
votes
1 answer

Extending GroupPrincipal and Members property

I want to extend the GroupPrincipal class to handle some custom properties: using System.DirectoryServices.AccountManagement; [DirectoryRdnPrefix("CN")] [DirectoryObjectClass("group")] public class MyGroupPrincipal : GroupPrincipal { //…
Paolo Tedesco
  • 55,237
  • 33
  • 144
  • 193
2
votes
1 answer

Creating new AD-LDS user with UserPrincipal-class always fails

If I want to create a new user with the UserPrincipal-class in the ADAM (Ad LDS) Directory (maybe also in Active Directory, I have not tested it), it always fails with the following message: “The principal could not be enabled because the existing…
HCL
  • 36,053
  • 27
  • 163
  • 213
2
votes
2 answers

AccountManagement create user return 'object already exists' exception

I'm trying to create a new UserPrincipal in a specific OU inside ActiveDirectory, and it returns an Exception with the message 'Object already exists'. (obviously) The user don't exists in that OU, and I'm testing its existence. What am I doing…
Juliano A. Felipe
  • 574
  • 1
  • 7
  • 15
2
votes
1 answer

UserPrincipal.FindByIdentity throws PrincipalServerDownException

I have an application that needs to bind against a remote customer's Active Directory to perform authentication tasks. using (var ctx = new PrincipalContext(ContextType.Domain, "customer.org", "ou=people,dc=customer,dc=org",…