active-directory

Finding Active Directory users from 2 OU

两盒软妹~` 提交于 2019-12-30 07:43:03
问题 I have a .Net application that reads user from active directory that is in a specific OU (ABCUsers). The following is the code: string DomainIP = "some domain IP"; string ContainerConnectionString = "OU=ABCUsers,DC=test,DC=com"; PrincipalContext domain = new PrincipalContext(ContextType.Domain, DomainIP, ContainerConnectionString, ContextOptions.SimpleBind); PrincipalSearcher searcher = new PrincipalSearcher(); UserPrincipal findUser = new UserPrincipal(domain); findUser.SamAccountName =

Finding Active Directory users from 2 OU

那年仲夏 提交于 2019-12-30 07:42:06
问题 I have a .Net application that reads user from active directory that is in a specific OU (ABCUsers). The following is the code: string DomainIP = "some domain IP"; string ContainerConnectionString = "OU=ABCUsers,DC=test,DC=com"; PrincipalContext domain = new PrincipalContext(ContextType.Domain, DomainIP, ContainerConnectionString, ContextOptions.SimpleBind); PrincipalSearcher searcher = new PrincipalSearcher(); UserPrincipal findUser = new UserPrincipal(domain); findUser.SamAccountName =

How can I better query multiple domains in Active Directory using C#?

时光怂恿深爱的人放手 提交于 2019-12-30 07:15:47
问题 I am attempting to expand a LDAP / AD search from only searching in the currently logged in domain to searching all domains in the AD. The method takes in the string with the query and returns and return an LDAPInformation object. While I am asking, is there any better way to search for the name than in this way? It is user unfriendly due to needing to use wildcards if looking for a person by last name (example: Doe*). public static LDAPInformation[] GetGlobalAddressListVIAName(string

how to federate between Azure B2B and B2C

非 Y 不嫁゛ 提交于 2019-12-30 05:25:06
问题 We are designing an application which will be used by client's employee, some of their vendors and consumers as well. All of these three types of user will have the different set of rights. We were analyzing the Azure AD and found that Azure B2B can be used for employees and vendors whereas B2C can be used for consumers. So, we need both of them. Can we setup our application in such a way that if can authenticate from B2B and B2C both? Or any other suggestion to implement this. Thanks In

Connect to domain SQL Server 2005 from non-domain machine

倖福魔咒の 提交于 2019-12-30 04:39:31
问题 I asked a question a few days ago (Access to SQL Server 2005 from a non-domain machine using Windows authentication) which got some interesting, but not usable suggestions. I'd like to ask the question again, but make clear what my constraints are: I have a Windows domain within which a machine is running SQL Server 2005 and which is configured to support only Windows authentication. I would like to run a C# client application on a machine on the same network, but which is NOT on the domain,

Retrieve >901 rows from SQL Server 2008 linked server to Active Directory

萝らか妹 提交于 2019-12-30 03:21:06
问题 In SQL Server 2008 (version 10.0.4000) I have created a linked server to an Active Directory server. This query: select TOP 901 * from openquery(adsisca, ' select givenName, sn, sAMAccountName from ''LDAP://10.1.2.3:389'' where objectCategory = ''Person'' and objectClass = ''InetOrgPerson'' ') works. However changing the query and trying to retrieve 902 rows does not : select TOP 902 * from openquery(adsisca, ' select givenName, sn, sAMAccountName from ''LDAP://10.1.2.3:389'' where

Query to list all users of a certain group

橙三吉。 提交于 2019-12-29 10:54:27
问题 How can I use a a search filter to display users of a specific group? I've tried the following: (& (objectCategory=user) (memberOf=MyCustomGroup) ) and this: (& (objectCategory=user) (memberOf=cn=SingleSignOn,ou=Groups,dc=tis,dc=eg,dc=ddd,D‌​C=com) ) but neither display users of a specific group. 回答1: memberOf (in AD) is stored as a list of distinguishedNames. Your filter needs to be something like: (&(objectCategory=user)(memberOf=cn=MyCustomGroup,ou=ouOfGroup,dc=subdomain,dc=domain,dc=com))

How to programatically update group policy with C++?

天大地大妈咪最大 提交于 2019-12-29 08:22:39
问题 I am managing group policies programmatically, but I am not able to find any function which updates group policy programmatically. i.e. gpupdate /force 回答1: I have found the answer, IGroupPolicyObject - Windows API to create/update policies programmatically. I would recommend you to go through this links, they will explain in deep about accessing Group Policies programmatically. Working with Group Policy Objects Programmatically Programmatically updating local policy in Windows If you have

Active Directory: DirectoryEntry member list <> GroupPrincipal.GetMembers()

穿精又带淫゛_ 提交于 2019-12-29 08:18:23
问题 I have a group, lets call it GotRocks. I am attempting to get all of its members, but I am getting wildly different results count-wise between DirectoryEntry and AccountManagement. Below are the counts by member retrieval method: Method 1: DirectoryEntry.PropertyName.member = 350 Method 2: AccountManagement.GroupPrincipal.GetMembers(false) = 6500 Method 2: AccountManagement.GroupPrincipal.GetMembers(true) = 6500 As a sanity check, I went into ADUC and pulled the list of members from the group

ldap search is very slow

给你一囗甜甜゛ 提交于 2019-12-29 08:16:51
问题 I am using JNDI to connect to the LDAP active directory, and I want to search for users where the name contains the search string, so my search method is as follows: public static List<LDAPUser> searchContactsByName( ExtendedDirContext extendedDirContext, String name) { try { LdapContext ldapContext = extendedDirContext.getLdapContext(); String searchBaseStr = extendedDirContext.getSearchBase(); String sortKey = LDAPAttributes.NAME; ldapContext.setRequestControls(new Control[] { new