.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Getting users list reporting to manager from LDAP

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net
 

Dear All,

I need to get list of users reporting to a particular manager from the Active directory.

In the active directory there is manager property with contains the data in the following way.

CN=Gegore Lid,OU=IT,OU=Sales,OU=XXXXX,OU=XXXX,DC=YYYY,DC=intra


Please help me in building the filter condition.


I am using the following

pUserName="Gegore Lid";

strSearch = "(&(objectClass=user)(objectCategory=user)((Manager cn=" + pUserName + "))";

DirectorySearcher dSearcher = new DirectorySearcher(dEntry, strSearch);

            //Account properites to load
            string[] arrPropertiesToLoad = { "displayName", "department", "manager", "sAMAccountName", "EmployeeNumber", "Title" };
            dSearcher.PropertiesToLoad.AddRange(arrPropertiesToLoad);

          SearchResultCollection sResultColl = dSearcher.FindAll();

 the above code is not returning any result.


Please help me in this.


Regards

Prakash





View Complete Post


More Related Resource Links

Getting list of users reporting from specific Manager from Active Directory

  

Dear All,


I am have requirement like displaying all the user information reporting to specific manager from Active Directory.


Please help me regarding this.


Regards

Prakash


Permission Errors for Users on Home Page only of SQL Server Reporting Services Report Manager

  
I have spent days now investigating this problem, so any help very much appreciated! I have a remote web server 2003 running SQL Server R2 Express Edition with Reporting Services installed. I use Report Builder 3.0 locally to build report. If I login via Internet to Report Manager Web Page as an administrator I can perform all the expected and required actions, creating new folders and assigning permissions for users etc. I have added a new user "ReportUser" as a Browser of a child folder. If ReportUser longs on to home page, he receives the all too familiar error: User 'XXXXXXXX\reportuser' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed. However, if the user starts at the child folder of home page, and then logs in, he sees the expected page, and can run the report!  This is not very satisfactory. How can I allow user to see home page, without an error message, but not be allowed to click on any folders to which he is not entitled? I am now aware that SQL Server R2 Express Edition has many limitations compared with full Editions (fixed roles, cannot manage Report Service from Management Studio etc) , and many of the "solutions" offered on the web just do not apply.   John Walton

List Users from Active Directory

  

When i try to List the users from Active directory, i get this exception.

Error while processing.System.Runtime.InteropServices.COMException (0x80072020): An operations error occurred at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) at System.DirectoryServices.DirectorySearcher.FindAll()

The code i used is :

DirectoryEntry de = new DirectoryEntry(_path);DirectorySearcher deSearch = new DirectorySearcher();

deSearch.SearchRoot =de;

deSearch.Filter = "(&(objectClass=user) (cn=" + UserName +"))";

SearchResultCollection results = deSearch.FindAll();

 But the DirectoyEntry method is getting validated if i use the overloaded method : DirectoryEntry(_path, domainAndUsername, password);

Please advice me.

Assigning users when creating a list item in a workflow

  

I'm using a workflow to assign tasks to users.  When I try to assign the task to a group (set in the workflow designer), the workflow gives me an error.  When I change the assign to property to a single user, the workflow works perfectly.  How do I get the workflow to assign the task to the group?  Or if that's not possible, can I get it to assign it to more than one user?

Kenn


Is there any way to list WebPart's authorised users?

  

Actually, I set access to some of the WebParts to desired group of SP users. (Web Part edition->Advance->last option on the bottom)

Is there any way to list this access? I'd like to have some kind of list with WebParts and users signed to its.


E-Mail Alerts for users on Task List

  

Is there any way to send e-mail alerts to a specific user wihtout assigning them the task or having them subscribe to the list.

It's a Task List on WSS 3 on Win2k3 Enterprise'

Thanks


Function retrieving users by country against (Active Directory) LDAP

  
Hello I've got such openquery SELECT * FROM Openquery(ADSI, 'SELECT EmployeeID, displayname, mailAddress, country FROM '' LDAP://MY-LDAP-PATH '' WHERE country=''coutry_code' '   ') country_code is 3 letters i think sth in format like USA, FRA etc I will need to retrieve users from up to 3 countries let say and i would like to create from this query above a stored procedure (or better a FUNCTION)  where someone calling a function can specify from which country does he/she wants to terieve users - when none country specified a function should retrieve users from all 3 let say. I'm not very advanced in programming in T-SQL yet so my question is -> can the variable be specified inside Openquery ? like for example SELECT * FROM Openquery(ADSI, 'SELECT EmployeeID, displayname, mailAddress, country FROM '' LDAP://MY-LDAP-PATH '' WHERE country=''@country' '   ') ACTIVE DIRECTORY HAS LIMITION OF RETRIEVING 1000 RECORDS AT ONCE - BUT NONE OF THESE COUNTRIES HAVE MORE THAN COUPLE HUNDREDS HOVWEVER summing them in one query this number of course will exceed 1000 recoreds so queries i think should be splitted and joined with union ??? Can anyone provide some example code of such function  The other problem i have is that openquery againt ADSI  above works correctly when i use SSMS localy on the server (connectin

No Access to Reporting Services Manager Website

  
Hi, I am trying to  access the report manager website with http://localhost:8080/Reports. I know that this was working in the past with the Administrator user. Now I get the login Form repeatedly and I have no access with any user. With the administrator user I can access the reporting services in Management Studio but not the website. Please help....

Customized list views and permissions to specific group users

  
Hi, I have created a custom list with 20 field/columns in wss3.0. I had four user groups(group1, group2,....3.....4) in my site collection with various levels of permissions. I have created four custom views (Group 1 view, Group2 view,...etc)in my list. Each view contains only certain fields out of 20. For example group 1 view contains field 1, 5, 7,10 and 13 of every item in my list.  My requirement is that when a user login, who is a member of group1. he should be able to view only Group1 view fields. He should not able to view other field/columns. I tried creating another field/column called as restricted users and wrote group names in that. In the View edit page I selected " show item when the column 'restricted users' is equl to [Me]. But I did not get it. Kindly help it out any one either programmatically or UI based. Thanks   

Upload File through SQL reporting manager fail

  
Hi Support, I encounter error message when I upload the .rdl file at SQL report manager. The error message as below: The report definition is not valid. Details: '.', hexadecimal value 0x00, is an invalid character. Line 700, position 10. (rsInvalidReportDefinition) The server we are running on version: Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)   Mar 29 2009 10:11:52   Copyright (c) 1988-2008 Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) Does SQL 2008 standard sp1 support SQL reporting services? Appreciate if someone know the answers, Thank You! Regards, SiewHiong    

FBA users (ldap provider) don't have any user profile info when logged in.... what am I doing wrong

  
Sharepoint 2010, Claims authentication, FBA using ldap membership provider and role provider against Active Directory.  User profiles all imported just fine -- used the LDAP FBA provider hitting Active Directory to do so too.  whenever an FBA user logs in, it doesn't seem like sharepoint is picking up any user attributes.  targeted audiences don't work and MY SETTINGS is blank other than account and name.  If the same user logs in but through Active Directory, everything works just fine... targeted audiences, etc. Am I doing something wrong or can I not use the LDAP provider to authenticate to AD and also use the user profiles from Sharepoint?  GRRRRR.  All this to get around the Windows Authentication popup so I can customize a better looking logon experience.  Help?

SharePoint 2010 Reporting Services report on sharepoint list rsExecutionNotFound

  
I cannot get SQL Reporting Services 2008 R2 to work with a datasource that is a sharepoint list.  Reporting services seems to work fine setup in SharePoint 2010 Integrated mode. When I try and run a report that is based on a sharepoint list, I immediatly get the following error: The report execution tp15sp4515l3seqqo4do3e45 has expired or cannot be found. (rsExecutionNotFound) This seems to be something I am doing wrong with the sharepoint configuration, I would guess.  I haven't tried a regular database query, but they used to work when reporting services was configured for native mode.  So I assume this is just a problem connecting to sharepoint 2010 lists, with the new SharePoint 2010 List connection type. Edit This has got to have something to do with a permission setting for the app pool account of sharepoint.  I read something once where it said you had to grant it permissions, but every guide I've found since then doesn't mention anything about it. This log entry is where the problem seems to be occuring, I just don't know what permissions to give TESTDOMAIN\spweb which is the app pool account. library!ReportServer_0-3!1bdc!09/01/2010-09:58:03:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database.  This may be due to a connection failure, tim

How to use SharePoint 2007 list data in Reporting Service (Visual Studio) 2008?

  
Jeez - I have been googling left and right, and tried all the suggestions. No luck in getting it to work. I am using Reporting Service 2008 tools in my VS2008, trying to create a simple report using SharePoint 2007 data (from a simple list). Here is what I've been doing: Created a simple SharePoint list in a test site - only one column (Title) with one record of data. Started Visual Studio 2008 and created a new Report Server Project Wizard project. I named the data source "dsTest". Type: "XML". As connection string I used: http://site/subsite/subsite/_vti_bin/lists.asmx. Credentials: "Use Windows Authentication (Integrated Security)". Clicked Next and arrived at the "Design the Query" form. I entered this in the Query string box: <Query> <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems" /> <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction> </Query> Clicking Next I get this error: An error occurred while the query design method was being saved. Failed to execute web request for the specified URL. Soap Fault: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. Now if I view the Details when trying it inside the Query Builder I get this: <errorstring xmlns="http://schemas.mi

Function retrieving users by country against (Active Directory) LDAP

  
Hello I've got such openquery SELECT * FROM Openquery(ADSI, 'SELECT EmployeeID, displayname, mailAddress, country FROM '' LDAP://MY-LDAP-PATH '' WHERE country=''coutry_code' '   ') country_code is 3 letters i think sth in format like USA, FRA etc I will need to retrieve users from up to 3 countries let say and i would like to create from this query above a stored procedure (or better a FUNCTION)  where someone calling a function can specify from which country does he/she wants to terieve users - when none country specified a function should retrieve users from all 3 let say. I'm not very advanced in programming in T-SQL yet so my question is -> can the variable be specified inside Openquery ? like for example SELECT * FROM Openquery(ADSI, 'SELECT EmployeeID, displayname, mailAddress, country FROM '' LDAP://MY-LDAP-PATH '' WHERE country=''@country' '   ') ACTIVE DIRECTORY HAS LIMITION OF RETRIEVING 1000 RECORDS AT ONCE - BUT NONE OF THESE COUNTRIES HAVE MORE THAN COUPLE HUNDREDS HOVWEVER summing them in one query this number of course will exceed 1000 recoreds so queries i think should be splitted and joined with union ??? Can anyone provide some example code of such function  The other problem i have is that openquery againt ADSI  above works correctly when i use SSMS localy on the server (connectin

multiple instances of report manager VS multiple users

  
Hello, I want multiple users to access same report or different reports through report manager for a report server. Will the scenario of opening multiple windows of report manager on same machine and execute reports from all windows simultaneously mean same as multiple users accessing the reports at the same time? If not, then how should I generate the scenario of multiple users? Regards.

Maintain users and groups list of Active Directory for an asp.net web application only

  
Hi, I have configured active directory in my server 2008. We have a web project using asp.net mvc named Audit planning and Execution Software(Apex2).What we want to do is to authenticate Active directory users for this project.I can get all active directory users, groups, users of a group etc.I want to add users in active directory for the Apex2 project only using asp.net.I also want to display only the users and groups of Active Directory registered with the Apex2 project only. And I also want to add active directory users from whole AD list to our project's AD list. Can you please tell me, how will I do this. Shall I create an Organizational Unit and maintain all users and groups there for our project? Or, is there any other way to do this?  please help me.Thank You

Don't see tab and toolbar of the report manager application after installing sql server reporting s

  
Hello everyone: I have tried to install and configure Reporting Service. I found lots of  errors along the way. The first one was an error (500.23) from IIS7. I applied the suggested solution on the IIS screen which was migrating configuration using AppCmd ( %SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/"). Next problem was  : Request is not available in this context Stack Trace: [HttpException (0x80004005): Request is not available in this context] System.Web.HttpContext.get_Request() +3465893 Microsoft.ReportingServices.UI.Global.get_ConfigurationManager() +47 Microsoft.ReportingServices.UI.GlobalApp.Application_Start(Object sender, EventArgs e) +32  This error was caused by the fact that Report Server and Report Manager were configured to DefaultAppPool in the Reporting Service Configuration Manager. I have switched to Classic .Net AppPool  for both Report Server and Report Manager and it has fixed the problem. Now my problem is that the Report Manager Application ( http://localhost/reports/folders.aspx ) shows no tab, toolbar or folder. What I now have on the Report Manage Application page is the header with the title and [home] and [Help] button links on the top right corner. I have made a report to test the problem but no folder shows o
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend