Questions tagged [account-management]

116 questions
6
votes
1 answer

DirectoryServicesCOMException when working with System.DirectoryServices.AccountManagement

I'm attempting to determine whether a user is a member of a given group using System.DirectoryServices.AccountManagment. I'm doing this inside a SharePoint WebPart in SharePoint 2007 on a 64-bit system. Project targets .NET 3.5 Impersonation…
antik
  • 5,282
  • 1
  • 34
  • 47
6
votes
2 answers

Cannot load System.DirectoryServices.AccountManagement in ASP.NET VB site

I have been working on adding Active Directory functionality to an already existing ASP.NET website following this guide by Microsoft: http://support.microsoft.com/kb/326340. It's been a long process, but what I'm stuck on now is not being able to…
6
votes
2 answers

Get UserPrincipal by employeeID

I have implemented System.DirectoryServices.AccountManagement for authentication into my webapps finding users (UserPrincipal) byidentity given username. However, I have several cases where I need to get AD accounts given only an employeeID. Is…
Jem
  • 4,313
  • 2
  • 18
  • 20
5
votes
1 answer

accessing the initials field using the DirectoryServices.AccountManagement

I'm new to accessing Active Directory and I was advised to use System.DirectoryServices.AccountManagement but I can't find the initials variable any help ?
Shehab Fawzy
  • 7,148
  • 1
  • 25
  • 18
5
votes
3 answers

UserPrincipal.FindByIdentity Insists "There is no such object on the server."

I am currently aiming to implement a read-only role provider for an ASP.NET application based on domain security groups using the utilities in the System.DirectoryServices.AccountManagement assembly. I have the following piece of code which works…
lsuarez
  • 4,952
  • 1
  • 29
  • 51
5
votes
1 answer

How do StackExchange sites associate user accounts and OpenID logins?

I love StackExhchange / StackOverflow's approach to integrating OpenID. As I understand it, the process goes something like this: If a user signs up with an OpenID provider (i.e. Google), StackOverflow (or similar site) creates an account for the…
5
votes
2 answers

COMException Unknown error (0x80005000) - DirectoryServices

I've been running into an error on one of my applications that happens a few times a month but has occurred twice this week. When this happens, it's always first thing in the morning when the first user loads the app and begins working (web…
5
votes
3 answers

GroupPrincipal.Members.Remove() doesn't work with a large AD group

I'm using the System.DirectoryServices.AccountManagement namespace classes to manage the membership of several groups. These groups control the population of our print accounting system and some of them are very large. I'm running into a problem…
tvanfosson
  • 524,688
  • 99
  • 697
  • 795
5
votes
1 answer

Remove my app from android account manager "add account"

When user create new account in my app, I create new account in android account manager. So user can see his account in settings->accounts and synch... So question: is it possible to remove my app from list when user click "add new account" in…
Kulibin
  • 444
  • 4
  • 12
4
votes
1 answer

Android: Enable imported account contacts programmatically

I'm successfully importing external contacts into the newly created account using this tutorial. The account is setup to re-sync programmatically and yet, to be able to see the synced contact, - unless the contact dupe is found - I need to do…
Bostone
  • 36,858
  • 39
  • 167
  • 227
4
votes
1 answer

.NET 3.5 - System.DirectoryServices.AccountManagement - AdvancedSearchFilter on group?

I'm using the System.DirectoryServices.AccountManagement API to pull a list of groups from AD. These groups all start with the same prefix so it's easy to find them using the prefix and a wildcard. What I'd also like to do is just get the groups…
4
votes
2 answers

Simple bind to AD-LDS fails from remote computer

I am using the API System.DirectoryServices.AccountManagement to bind to an AD-LDS instance. I am using simple bind with a user that exists locally in the AD-LDS instance. It works when I run the client on the server that hosts AD-LDS but it doesn't…
kls
  • 591
  • 3
  • 13
4
votes
1 answer

ASP.net Identity - How does UserManager Have Access To Roles?

... and we're only inside Microsoft.AspNet.Identity. (We're not even looking at the base implementation at Microsoft.AspNet.Identity.EntityFramework.) The UserManager class only takes in an IUserStore at constructor. It does not have an…
Mickael Caruso
  • 8,721
  • 11
  • 40
  • 72
4
votes
2 answers

GroupPrincipal throwing "System.Runtime.InteropServices.COMException (0x8007200A): The specified directory service attribute or value does not exist."

I'm using System.DirectoryServices.AccountManagement to query for a user and then find the groups for that user. var _principalContext = new PrincipalContext(ContextType.Domain, domainAddress, adContainer, adQueryAccount,…
Jim
  • 4,910
  • 4
  • 32
  • 50
3
votes
3 answers

Remove user account from administrators group on remote machine using C# and AccountManagment namespace

I have the code: public bool RemoveUserFromAdministratorsGroup(UserPrincipal oUserPrincipal, string computer) { try { PrincipalContext oPrincipalContext = new PrincipalContext(ContextType.Machine, computer, null,…
andDaviD
  • 555
  • 1
  • 11
  • 26