List all users and other information into application

Hi,
In the LDAP that we use, it contains - user id and xyz_code (this code is particular to application). Note that for each user_id there exists one xyz_code.
I can get the user id from IUser and xyz_code from an attribute app_xyz_code.
String xyzCode = sapume.getValue("app_xyz_code",iuser, true);
I have a requirement where I need to get user ids for a set of xyz_codes.
1) Suppose I have 100 xyz_codes I need to get 100 users from LDAP. So 100 times I need to hit LDAP. How do i make a search in LDAP using xyz_code. Is it preferrable to make a search like this?
2) Another thing I want to know is if it is possible to get all the users and their corresponding xyz_codes from LDAP and store them in a List/Vector/Enumeration. So that I can search in the list for user id corresponding to xyz_code.
Any code snippets is appreciated.
Thank you
Karthika

Thanks for your reply!
I tried the following:
$Users = get-aduser -SearchBase 'OU=Mes Utilisateurs,DC=itced,DC=lan' -filter '*'
$OU = $User.distinguishedname -split ',',2 | select -last 1
$output = @()
Foreach($User in $Users){
$budgetanalytics = Get-ADOrganizationalUnit -SearchBase $OU -Properties objectGUID
$Object = New-Object PSObject                                       
$Object | add-member Noteproperty user $user.name         
$Object | add-member Noteproperty OU $OU                       
$Object | add-member Noteproperty objectGUID $objectGUID       
$output += $Object
$output
but I get the following
user                                             
OU                                              
objectGUID                                      
User1                                            
OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
User2                                            
OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
Why do I get "Microsoft.PowerShell.Commands.Internal.Forma..." instead of the actual objectGUID of the Organizational Unit
Thanking you in advance

Similar Messages

  • How can I list all users and their DEFAULT tablespace?

    How can I list all users and their DEFAULT tablespace?
    Peter

    Peter, the following short article that lists the most heavily used Oracle rdbms dictionay views might be of interest based on your question:
    How do I find information about a database object: table, index, constraint, view, etc… in Oracle ? http://www.jlcomp.demon.co.uk/faq/object_info.html
    HTH -- Mark D Powell --

  • BI Report - List all users and their assigned roles

    Hello,
    i need a report, which lists me all users and their roles.
    Which table stores this membership information about the users?
    USR or UGP does not have any values

    Hi Reynaldo,
    You can go to SE16 -> table name "AGR_USERS" and see the records for all users. Arrange them in ascending order by name and you will get the report what you have mention above.
    Download it and put it in EXCEL.
    Best Wishes.
    Kumar

  • List all users and their OUs they belong to

    Hi,
    I would like to list all users with the OU they belong to and furthermore add an specific attribute that was added...
    I can get both information separately:
    get-aduser -SearchBase 'OU=DOMAIN,DC=mygroup,DC=re,DC=lan' | FT name
    and
    Get-ADOrganizationalUnit -SearchBase 'OU=DOMAIN,DC=mygroup,DC=re,DC=lan' -properties name,budgetanalytics | FT name,budgetanalytics
    but I'd like to get the list containing user1, its OU, its budgetanalytics
    Thanking you in advance,
    Cédric

    Thanks for your reply!
    I tried the following:
    $Users = get-aduser -SearchBase 'OU=Mes Utilisateurs,DC=itced,DC=lan' -filter '*'
    $OU = $User.distinguishedname -split ',',2 | select -last 1
    $output = @()
    Foreach($User in $Users){
    $budgetanalytics = Get-ADOrganizationalUnit -SearchBase $OU -Properties objectGUID
    $Object = New-Object PSObject                                       
    $Object | add-member Noteproperty user $user.name         
    $Object | add-member Noteproperty OU $OU                       
    $Object | add-member Noteproperty objectGUID $objectGUID       
    $output += $Object
    $output
    but I get the following
    user                                             
    OU                                              
    objectGUID                                      
    User1                                            
    OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
    User2                                            
    OU=Mon OU,OU=Mes Utilisateurs,DC=itced,DC=lan    {Microsoft.PowerShell.Commands.Internal.Forma...
    Why do I get "Microsoft.PowerShell.Commands.Internal.Forma..." instead of the actual objectGUID of the Organizational Unit
    Thanking you in advance

  • List all users and their own roles.

    Hi everybody!
    I have to make a list of all sap users and their own separated roles by user. There are any transaction to do it? The SUIM transaction gives me a sap user and their own roles, but if I try with a lot users It gives me all the roles that are using those users but don't give me the roles for each one.
    Thanks a lot.
    Best regards.

    Hi Reynaldo,
    You can go to SE16 -> table name "AGR_USERS" and see the records for all users. Arrange them in ascending order by name and you will get the report what you have mention above.
    Download it and put it in EXCEL.
    Best Wishes.
    Kumar

  • HT5622 I am very frustrated as I have forgotten my security questions and need to clear them out.  I have all of my other information on the account.

    I am very frustrated as I have forgotten my security questions and need to clear them out.  I have all of my other information on the account.

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset (we are fellow users here on these forums).
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • Would like to create a script for list all elements and structure of an indesign document

    Hello everybody,
    I'm a very beginner in indesign scripting.
    I would like to create a script in order to list all elements and the inner structure of a n indesign document.
    The aim for me is to understand how elements are sorted and arranged into indesign, and be able to find an specific element by its item name.
    The output document could be an xml or txt document with a treeview structure.
    I would like have a rough idea of which kind of javascript code I should use for that.
    Thanks for answers.

    Hi Ossydoc,
    You can use Muse to create such a website. All you need to do is, create links in Muse for the sermons and select  " link to File " in the hyperlink option and link to those Mp3 files.
    Please refer to this screenshot :- http://prntscr.com/4xvdup
    Now, when you publish your site,  Muse would automatically upload those files onto the server and the users would then be able to listen as well as download those sermons using the links on your site.
    Hope this helps
    Regards,
    Rohit Nair 

  • Retrieving all users and last successful login

    Hi. I"m trying to return a list of all users and thier last successful login to a particular database. Oracle version is 10.2.0.4 on RHEL 5.3. I am attempting to join to the sys.aud$ table or use the audit_trail views but I didn't know if there was something more obvious to do. We don't have Audit vault yet nor do we have actual logon triggers that write to an audit table - just have auditing turned on. audit_trail=db_extended.
    I appreciate any help in advance.

    Thanks....I have that on. I am now trying to get this information out of the sys.aud$ table to a report in a format similar to
    username, last successful logon
    by joining the all_users and sys.aud$ tables to get the max timestamp for action 100
    where user is in a list of users from all_users.
    This is taking a long time to return any information.
    I am wondering if there are other ways to get this information out of the database in a quicker fashion.

  • List all folders, and subfolders, in a directory

    I'm trying to find a way to list all folders, and subfolders, in a directory.  I ran the code below and got a message that says 'Access is Denied'.  There is no way access is denied to that folder. How can I list all folders, and subfolders, in
    a directory?
    --'C:\Users\Ryan\Desktop\Coding\';
    set nocount on
    declare @curdir nvarchar(400)
    declare @line varchar(400)
    declare @command varchar(400)
    declare @counter int
    If (select count (*) from sys.objects where name='Output') <> 0 DROP TABLE output
    If (select count (*) from tempdb.sys.objects where name like '%#Tempoutput%') <> 0 DROP TABLE #Tempoutput  
    If (select count (*) from tempdb.sys.objects where name like '%#dirs%') <> 0 DROP TABLE #dirs  
    create table #dirs (DIRID int identity(1,1), directory varchar(400))
      Set @command = 'dir "C:\Users\Ryan\Desktop\Coding\Microsoft Access\" /S/O/B/A:D'
     insert into #dirs exec xp_cmdshell @command
      set @counter = (select count(*) from #dirs)
    create table #tempoutput (line varchar(400))
    create table output (Directory varchar(400), FileSize varchar(400))
        While @Counter <> 0
          Begin
            Declare @filesize int
            set @curdir = (select directory from #dirs where DIRID = @counter)
            set @command = 'dir "' + @curdir +'"'
            insert into #tempoutput
            exec master.dbo.xp_cmdshell @command
               select @line = ltrim(replace(substring(line, charindex(')', line)+1,len(line)), ',', ''))
               from #tempoutput where line like '%File(s)%bytes'
               Set @filesize  = Replace(@line, ' bytes', '')
            Insert into output (directory, Filesize) values (@curdir, @filesize)
            Set @counter = @counter -1
           End
           Delete from output where Directory is null
    select * from output
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Can you tell us how you're executing this code? Is it called from sql agent job or are you executing it by calling code directly?
    Did you try creating a proxy for xp_cmdshell and then executing it?
    http://www.mssqltips.com/sqlservertip/2143/creating-a-sql-server-proxy-account-to-run-xpcmdshell/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to list all user's "followed" count?

    Dear all,
    I need to genearate a report to list all user's Followed items count.
    I found follow REST API:
    http://msdn.microsoft.com/en-us/library/dn194080.aspx#bk_FollowedCount
    By using "My/followedcount", I can get current user's count of items he or she followed. It is exactly what I need. But I need to list all users' "following count". How can I do it?
    Thank you for any input.
    Mark

    Hi Mark Lui,
    Please check the code sample in below article, whether it is working in your scenario, it is using the client object model to get the specified user’s followed content, to get all users’ following content, please first iterate users information, then use
    this to get followed count:
    How to get Count and List of documents and sites followed by a User in Office 365 SharePoint 2013 Site using CSOM:
    http://sundarnarasiman.net/?p=186
    Thanks,
    Qiao Wei
    TechNet Community Support

  • List of users and their decimal notation settings in SAP system

    Hi all, i'm looking to get my hands on a list of all users in our SAP system and their respective decimal notation settings? I know that these can be mass changed using SU10 however I am unable to determine how to view a list of users and their settings.
    Thanks,
    James

    Hi James,
    You can find many useful reports, in SUIM transaction to see user details, but not decimal notation field. I don't know a report to show decimal notations, but as a workaround, in order to see the decimal notation, you can check "USR01-DCPFM" by using "SE16".
    Best regards,
    Orkun Gedik

  • OCS2007R2 - how to create a list of users and meeting policies assigned to them?

    Hi all
    is it possible to create a list of users and policy assigned?
    For example
    UserA   Default
    UserB   High
    UserC    High
    UserD   Medium
    and so on?
    Thanks in advance!

    You can try to use the Office Communications Server 2007 R2 Resource Kit Script LCSEnableConfigureUsers
    The LCSEnableConfigureUsers.wsf script automates enabling and configuring users belonging to the local Active Directory Domain Services domain.
    For details, see
    http://blogs.technet.com/b/nexthop/archive/2011/08/02/how-to-use-the-office-communications-server-2007-r2-resource-kit-script-lcsenableconfigureusers.aspx
    Lisa Zheng
    TechNet Community Support

  • Upgraded to 3.1 and lost all users and groups.  How do we get them back?

    We ran the update to Server 3.1 (from 3.0) on our Mavericks Mac-Mini Server.
    Everything had been fine before the update, but now all users and groups have completely disappeared.
    The only user we have is the main administrator log-in.
    Since we verified that all of our data, wikis, and other items are still in place, it might be easier to just re-create the groups and users (and permission therein).
    But, we cannot log into Workgroup Manager, nor can we add users/groups in the Server app (because it is "grayed-out").
    Can somebody please provide a suggestion??
    We are a small engineering firm with only 5 users, so it's not like this would take all day.
    Thanks, Mike

    Have you tried
    sudo sso_util configure -r REALM_NAME -a diradmin afp
    (cf. Lion Server: AFP users unable to authenticate with Kerberos after upgrading)in Apple Support ?
    p.

  • Getting a list of users and permission from a folder

    I run this command to get a a list of users and permission from a folder
    $project_folder = "\\servername\foldername"
    get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType, FileSystemRights > folder.csv.
    This only lists information for 1 folder.
    If i have multiple folders how should the code be modified?

    this is the code i am looking for 
     $project_folder
    = "\\servername\foldername\foldername1"
    get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType,
    FileSystemRights > folder.csv.
    I  run this code and this gives me the information for only the folder 'foldername1'.
    Ex. i need a list of users who have permmission in \\servername\foldername\foldername2.
    i run the code and it gives me the permissions and list of users in foldername2.
    This is the issue
    IF there are multiple folders \\servername\foldername\foldername2, \\servername\foldername\foldername1,
    i need to run the code each time for 1 folder. 
    is there a command where i can combine the path of these 2 or more folders and export
    it to csv
    Ex.  $project_folder
    = "\\servername\foldername\foldername1",
    "\\servername\foldername\foldername2"
    get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType,
    FileSystemRights > folder.csv.
    This will give me the list of users and the type of access they have in foldername1 and
    foldername2

  • PowerShell - List all users that have access to a particular SPLIstItem

    Hi there,
    In PowerShell - how to list all users that have access to a particular SPLIstItem?
    Thanks so much in advance.

    Hi frob,
    According to your description, my understanding is that you want to list all users who have access to a particular SharePoint list item via PowerShell.
    You can use the following PowerShell command:
    $web = Get-SPWeb http://sp/sites/First
    $list=$web.Lists["listV2"]
    $item=$list.Items | where {$_['ID'] -eq 1}
    $item | Select -ExpandProperty RoleAssignments |Select {$_.Member.DisplayName}, {$_.Member.LoginName}, RoleDefinitionBindings
    In the above command, you need to change the web URL to your site's URL, change “listV2” to the name of your list, and change the ‘1’ to the ID of the list item.
    The result looks like:
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

Maybe you are looking for

  • Recognition of COS/COGS Account if the process is A/P Reserve Invoice

    hi there, i am trying to post an A/R Reserve Invoice of non-inventoriable item because it's Advance payment to Supplier scenario. would you know on what transaction can i create to recognize the COS/COGS Account of it? i believe if my process is : 1.

  • Help with deleting junk email

    Can anyone please help with a problem I'm having with icloud email. I have a number (not all) of messages in junk mail and no matter what I do I can't seem to delete them. I delete them, they are gone, but when I come back they are back again but any

  • Please tell me the Plugins (Struts) for eclipse

    I am new in struts, so please anyone tell the name of plugins i have to download. and please tell me the process of run my application in eclipse.

  • When WiFi is Enabled

    I am using a I phone 3GS when wifi is off the icon in the upper left corner tells me if I am connected to 2G EDGE or 3G , when I enable wifi the icon displays wifi that's ok but when I make a call or receive a call I have no way of telling how I am c

  • Customization on SAVE button

    Hi We have Oracle Applications 11i (11.5.10.2) . I have one query regd. oracle Form customization. For me, it is necessary to put customization logic on SAVE button lying on toolbar. My problem cannot be solved using custom.pll . Can you please give