active-directory

ASP.NET Get data from AD about user

扶醉桌前 提交于 2020-01-05 04:25:09
问题 Need to identify user on intranet site, windows user name is the goal. That will be appended to params going to SQL Server in the end. I can get HttpContext.Current.Request.ServerVariables("LOCAL_ADDR") 192.168.112.81 We have a mixed bag of addresses here, in that 33% are fixed and the rest are allocated. Is there a recourse to identify the user assigned to an IP within AD? If so do you have a link or an example? TIA. 回答1: Within a page, the username can be found with: Page.User.Identity.Name

SQL Server row level security - many to many

二次信任 提交于 2020-01-04 14:33:37
问题 We are using SQL Server 2008 and have our permissions setup in Active Directory (AD). Each row in a core table needs to be only viewable by those that have permission to view each row. I can setup row level security on each row (each row contains a single role that lines up with an AD group), however I have the following problem :- because the roles represent countries I have several 100 roles. Further I have some users who have access to several roles...and the several roles given users have

Cannot connect to server configured for CAM (Active directory hook) using the Cognos TM1 API

半城伤御伤魂 提交于 2020-01-04 14:13:32
问题 Is there anyway to connect to a server that uses CAM authentication in VBA using the TM1 API? I've tried the following code based on the answer found here: SystemServerCAMSecurityRequired error when authenticating using Cognos Dim credentials(1 To 3) As Long credentials(1) = TM1ValString(hPool, Trim(CAMNamespace), 0) credentials(2) = TM1ValString(hPool, Trim(ClientName), 0) credentials(3) = TM1ValString(hPool, Trim(ClientPassword), 0) vCredentials = TM1ValArray(hPool, credentials, 3) hServer

Is there a way to query who are activesync/bb users through Exchange PowerShell?

醉酒当歌 提交于 2020-01-04 13:46:54
问题 Is there a way to query against exchange 2007 to distinguish who is either an active sync or blackberry user using powershell exchange addin? 回答1: BBES typically uses a service account that has access to ALL mailboxes in order to do it's thing. you will want to look at the BBES server itself to find out which users are active, not AD or Exchange. Because BBES is backed by a database, just dig into the dbo.UserStats table to see what's there. 回答2: Try this one. Get-CASMailbox -resultsize

Validating domain user credentials

时间秒杀一切 提交于 2020-01-04 02:41:09
问题 I need a way to validate a user/password pair for native c++ on windows. Input is user and password, user can be in DOMAIN\user format. Basically I need to write a function that: If user/password is a valid local account, returns true. (part 1) If user/password is valid on the domain given, return true also. (part 2) else return false. Using KB180548 I solved (part 1) (but I had to also check if the user name is a valid user, because fails for users with blank passwords - ugly workaround but

How to sort by first and last name, then by SamAccountName where not all names have a first and last?

不问归期 提交于 2020-01-04 02:06:24
问题 Currently, I have the below, pulling from LDAP. // Get context, based on currently logged on user PrincipalContext domainContext = new PrincipalContext(ContextType.Domain, Environment.UserDomainName); // Search for the "Domain Users" group, with domain context GroupPrincipal group = GroupPrincipal.FindByIdentity(domainContext, IdentityType.SamAccountName, "Domain Users"); if(group != null) { List<Principal> members = null; members = group.GetMembers(false) .OrderBy(principal => principal.Name

Check if user exists in Active Directory

偶尔善良 提交于 2020-01-04 01:51:09
问题 I am using vb.net and I want to check whether a particular user exists in Active Directory. If it does, I want to display the particular user's details. How to do it? User login credentials are passed via textbox control My code: Dim de As DirectoryEntry = GetDirectoryEntry() Dim ds As DirectorySearcher = New DirectorySearcher(de) ds.Filter = "(&(objectClass=txt1.text))" ' Use the FindAll method to return objects to SearchResultCollection. results = ds.FindAll() Public Shared Function

AD LDS through SSL on Windows Server 2012 R2

孤人 提交于 2020-01-03 21:15:32
问题 i am trying to configure my AD LDS instance to run through SSL so that i can connect to it from another computer using my application and perform password change operations. I installed the Certificate Authorities to create a Server certificate which i can use on my AD LDS instance. I added the certificate to the Personal Store of the AD LDS instance and gave read permission on the certificate for everyone (i couldn't find how to add only my AD LDS service name to it.) When i try to connect

System.DirectoryServices.AccountManagement.PrincipalContext and Impersonation in a WCF service

荒凉一梦 提交于 2020-01-03 19:16:43
问题 Working with the PrincipalContext in code that lies behind a WCF service. The WCF service is impersonating, to allow a 'pass-through' type authentication. While everything else I do with Active Directory (mostly the System.DirectoryServices.Protocols namespace) works fine in this scenario, for some reason the classes in System.DirectoryServices.AccountManagement throw a fit. Sample code that fails: PrincipalContext context = new PrincipalContext(ContextType.Domain, domainName); UserPrincipal

Active Directory [closed]

瘦欲@ 提交于 2020-01-03 18:44:43
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . How can i get the password for a user from Active Directory 回答1: Simple, you cannot. Passwords are not stored in nearly all authentication systems. Instead, they are converted into a 'hash' that is stored instead. Then, when you want to prove that you know the password, you convert the password you type into a