GroupMemberListerMBean / list users in a group from AD

Hi!
I need to fetch out a list of users belonging to a group defined in AD.
I have tried to use GroupMemberListerMBean, but find little or no information when searching for code/hints about it.
Have any one tried with LDAP?
I am using Bea WorkShop for Weblogic Platform v.10.0
Please assist someone.

If you are using an old version of Portal, you can use the wwsec_api.users_in_group:
[http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/wwsec_api.html#function-users_in_group]
Otherwise, you can use DBMS_LDAP package to get the unique_member property of the group, and then tokenize it to get all the users. If it does not match what you have in Portal is because the provisioning is not working properly.

Similar Messages

  • Add user in OID group from SOA Suite

    Hello All,
    I want to add users in OID groups from a SOA application (BPEL process), is there any way to achieve this?
    Thanks

    It has the functions to add: Use this function from Group class.
    addUniquemember
    public void addUniquemember(javax.naming.directory.DirContext ctx, java.lang.String dn) throws UtilException
    Adds the DN as a uniquemember of this group
    Parameters:
    ctx - a valid DirContext
    dn - the DN representing the object to be added
    Reference Links:-
    LDAPGroup (Oracle Internet Directory API Reference)
    Group (Oracle Internet Directory API Reference)

  • How to list users under multiple groups and users sub groups

    Hi, I am stump, which is not hard to do. i have a list of groups and i want to list the users in those groups and then in the next column lists all the citrix only groups for each user. hopefully im describing that correctly. Heres what i have but it is
    not listing the users groups. I am not sure how to proceed.
    $CurrentDate = Get-Date
    $CurrentDate = $CurrentDate.ToString('MM-dd-yyyy_hh-mm-ss')
    $Groupname = "Distribution Lists"
    $excel = New-Object -comobject Excel.Application
    $excel.visible = $True
    $wbook = $excel.Workbooks.Add()
    $wsheet = $wbook.Worksheets.Item(1)
    $wsheet.Cells.Item(1,1) = "Groupname"
    $wsheet.Cells.Item(1,2) = "Member"
    $wsheet.Cells.Item(1,3) = "ACID"
    $wsheet.Cells.Item(1,4) = "Department"
    $range = $wsheet.UsedRange
    $range.Interior.ColorIndex = 19
    $range.Font.ColorIndex = 11
    $range.Font.Bold = $True
    $intRow = 2
    $groups = get-adgroup -Filter * -properties * -Searchbase "OU=Citrix,OU=Permission,OU=Groups,OU=Home Office,OU=domain,DC=Domain,DC=com"
    $targetFile = "c:\temp\$groupname $CurrentDate.csv"
    Add-Content $targetFile "Group;Member;ACID;Department"
    foreach ($group in $groups){
    $groupMembers = get-adgroupmember $group -Recursive | Get-ADUser -Properties Department, DistinguishedName| Where-Object { $_.Enabled -eq 'True' } | Select-Object Name, samaccountname, department, distinguishedname, @{n='MemberOf';e={$_.MemberOf -replace '^cn=([^,]+).+$','$1' -join '; '}
    foreach ($groupMember in $groupMembers){
    $groupName = $group.Name
    $memberName = $groupMember.Name
    $acid = $groupMember.samaccountname
    $groups = $usergroups
    #$department = $groupMember.department
    $department = $groupMember.memberof
    #$DistinguishedName = $gropmember.distinguishedname
    $line = "($groupName)--------($memberName)-----($acid)-------($department)------($usergroups)"
    add-content $targetFile $line
    $wsheet.Cells.Item($intRow,1) = $groupName
    $wsheet.Cells.Item($intRow,2) = $memberName
    $wsheet.Cells.Item($intRow,3) = $acid
    $wsheet.Cells.Item($intRow,4) = $groups
    $wsheet.Cells.Item($intRow,5) = $DistinguishedName
    $intRow++
    $WorkBook.EntureColumn.AutoFit()
    $excel.SaveAs("DL" + "name.xlsx")
    $excel.Close()

    Hi Glacket,
    Below codes should give you headsup.
    This command will give you estimate the result count for each group:
    PS C:\Users\Administrator> Get-ADGroup -Filter {Name -like "TestGroup*"} | Select Name, @{Expression={get-adgroupmember $_ -recursive | Measure | Select -ExpandProperty Count};Label="Count"}
    Name Count
    TestGroup1 7
    TestGroup2 8
    Note that as said earlier we are getting duplicated results(12,13,14) for users belonging to multiple groups. Result is in order as per earlier code's count and order.
    Get-ADGroup -Filter {Name -like "TestGroup*"} | get-adgroupmember -recursive | Select Name,@{Expression={Get-ADPrincipalGroupMembership $_ | Select -ExpandProperty Name};Label="GroupMemberOfName"}
    Name GroupMemberOfName
    User100 {Domain Users, TestGroup1}
    User14 {Domain Users, TestGroup1, TestGroup2}
    User13 {Domain Users, TestGroup1, TestGroup2}
    User12 {Domain Users, TestGroup1, TestGroup2}
    User11 {Domain Users, TestGroup1}
    User10 {Domain Users, TestGroup1}
    User1 {Domain Users, TestGroup1}
    User19 {Domain Users, TestGroup2}
    User18 {Domain Users, TestGroup2}
    User17 {Domain Users, TestGroup2}
    User16 {Domain Users, TestGroup2}
    User15 {Domain Users, TestGroup2}
    User14 {Domain Users, TestGroup1, TestGroup2}
    User13 {Domain Users, TestGroup1, TestGroup2}
    User12 {Domain Users, TestGroup1, TestGroup2}
    Use below to export to CSV:
    Get-ADGroup -Filter {Name -like "TestGroup*"} | get-adgroupmember -recursive | Select Name,@{Expression={Get-ADPrincipalGroupMembership $_ | Select -ExpandProperty Name};Label="GroupMemberOfName"} | Export-Csv C:\ListGroups.csv
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Add users to a group from another Active Directory domain

    Hi Folks,
    I need add users in a group the active directory through the FIM 2010 R2.
    My scenery it is:
    Domain A with FIM 2010 R2 provisioning users for Domain B;
    I need get users the Domain B and add in group in Domain C.
    What's better way, create FIM portal for them, or create aditional script/development for FIM 2010 R2.
    Thanks a lot!
    Wilsterman Fernandes

    There are two approaches to do it.
    1st - easier - using FIM Portal/Service - just create a criteria based group that would be created in Domain C.
    2nd - more difficult, but you don't need FIM Service/FIM Portal - just export all users to one table in SQL and create a view, where a group and members (users from Domain B) are. It would be cheaper as you don't have to have FIM Service to do it. But if
    you have it, first is easier.
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • Getting a user's primary group from Active Directory

    I'm coding a java web app that should authenticate a user to Active Directory and return his primary group.
    Using JNDI apis I realized the first part (authentication) and functions well but still having problems with the second part (getting the user's primary group).
    Is there somebody who knows/gets some codes for getting this info from Active Directory using java?
    Thanks a lot.
    Regards.
    John.

    I'm coding a java web app that should authenticate a user to Active Directory and return his primary group.
    Using JNDI apis I realized the first part (authentication) and functions well but still having problems with the second part (getting the user's primary group).
    Is there somebody who knows/gets some codes for getting this info from Active Directory using java?
    Thanks a lot.
    Regards.
    John.

  • List users of a Group

    Hi,
    I've just created some APEX User Groups, and associated users with them. Within the APEX, is there a way that I can list all members of a group in one place: I seem to have to go into each user in turn to find out which groups they being too, which is rather timeconsuming.

    Hi,
    Try running:
    SELECT G.GROUP_NAME, U.USER_NAME
    FROM WWV_FLOW_GROUP_USERS G
    INNER JOIN WWV_FLOW_USERS U ON G.USER_ID = U.USER_IDAndy

  • People Picker can resolve users and security group from another domain but no validation for groups

    Dear all,
    Here is the scenario of our issue:
    We are migrating from Domain A to Domain B and in Domain A we currently have a SharePoint 2013 on which we want to set permissions for users and groups that have already migrated to Domain B.
    A bi-directional trust exist between the two domains and all applications relying on trust and resolving IDs from on domain to another are working fine (Windows RDS for instance)
    The "bug" that we have is when using the PeoplePicker, it can resolve without any issue a user account in Domain A or B, and a security group (type global, I haven't tried local or universal yet) from domain A or B. But for the security groups
    only (it works well for users), when I click on "Save" to validate the add of the group to the site permissions, I have the following error:
    I have seen a lot of similar issues on the web but no answer so far that work :( 
    Example: https://social.technet.microsoft.com/forums/sharepoint/en-US/74e8d14b-a0f4-4e21-8cfa-b1a937247160/cant-provision-security-to-old-domain-users
    If you have any question that could help you to understand it, do not hesitate. 
    Thanks a lot in advance for your help ! :)

    Can you give the snippet from the ULS log where you're seeing this error?
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Security API help needed / howto list user in group

    Hi there,
    i have tried all example programs of the hyperion security api. hard work to correct the errors in these scripts.
    now i can create native groups an users and can create groups on groups or put users in native groups.
    i have read the java doc / reference for the security api too but its not possible for me to list users of a group (group reference by name).
    is there anybody who can help with a code sample to list users of a group like "testgroup" ?
    something like (...getGroups(context,"testgroup")...) ??
    Best Regards
    Kai

    Please don't cross-post. It is considered very rude to do that here:
    http://forum.java.sun.com/thread.jspa?threadID=5233033&messageID=9953169#9953169

  • Not able to Add users to Secutity Groups in ADS

    Hi all,
    I am successfully able to create the user in ADS in OU & users. I am not able to add them to the any group which is ADS. can any body help me out? it is much appreciated.
    Sriram

    AD gropus are managed by Windows Ad teams. You cannot add users to Ad group from CMC directly.
    Ask your windows team to add users to particular AD group and then update the Windows Ad authenctication from CMC to reflect in BO

  • Refreshing cache group from C/C++ application

    Hi
    anyone knows how to refresh a user-managed cache group from an application developed in C or C++ (ttclasses ) ?
    Please HELP !!!!!!
    lewismm

    Execute the relevant SQL statement ('REFRESH CACHE GROUP cgname' is the most likely one) just like you would any other SQL statement.
    Chris

  • Getting list of all users and their group memberships from Active Directory

    Hi,
    I want to retrieve a list of all the users and their group memberships through JNDI from Active Directory. I am using the following code to achieve this:
    ==================
    import javax.naming.*;
    import java.util.Hashtable;
    import javax.naming.directory.*;
    public class GetUsersGroups{
         public static void main(String[] args){
              String[] attributeNames = {"memberOf"};
              //create an initial directory context
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://172.19.1.32:389/");
              env.put(Context.SECURITY_AUTHENTICATION, "simple");
              env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
              env.put(Context.SECURITY_CREDENTIALS, "p8admin");
              try {
                   // Create the initial directory context
                   DirContext ctx = new InitialDirContext(env);     
                   //get all the users list and their group memberships
                   NamingEnumeration contentsEnum = ctx.list("CN=Users,DC=filenetp8,DC=com");
                   while (contentsEnum.hasMore()){
                        NameClassPair ncp = (NameClassPair) contentsEnum.next();
                        String userName = ncp.getName();
                        System.out.println("User: "+userName);
                        try{
                             System.out.println("am here....1");
                             Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should be returned
                             System.out.println("am here....2");
                             Attribute groupsAttribute = attrs.get(attributeNames[0]); // memberOf
                             System.out.println("-----"+groupsAttribute.size());
                             if (groupsAttribute != null){
                                  // memberOf is a multi valued attribute
                                  for (int i=0; i<groupsAttribute.size(); i++){
                                  // print out each group that user belongs to
                                  System.out.println("MemberOf: "+groupsAttribute.get(i));
                        }catch(NamingException ne){
                        // ignore for now
                   System.err.println("Problem encountered....0000:" + ne);
                   //get all the groups list
              } catch (NamingException e) {
              System.err.println("Problem encountered 1111:" + e);
    =================
    The following exception gets thrown at every user entry:
    User: CN=Administrator
    am here....1
    Problem encountered....0000:javax.naming.NamingException: [LDAP: error code 1 -
    000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
    ]; remaining name 'CN=Administrator'
    I think it gets thrown at this line in the code:
    Attributes attrs = ctx.getAttributes(userName, attributeNames);
    Any idea how to overcome this and where am I wrong?
    Thanks in advance,
    Regards.

    In this sentence:
    Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should
    It seems Ok when I add "CN=Users,DC=filenetp8,DC=com" after userName, just as
    userName + ",CN=Users,DC=filenetp8,DC=com"
    But I still have some problem with it.
    Hope it will be useful for you.

  • I have two users listed in my admin group. How do I get rid of one?

    I have two users listed in my admin group, but the undesired one doesn't show up in users and groups settings pane. How do I get rid of it?

    Well, I found a link which showed me how to find the hidden/unwanted user and get rid of it (remove hidden users: Apple Support Communities). Now when I get info from the drive on my network I find this:
    Is this normal? I would expect to find something other than (unknown).

  • PS Script to find the list of users and the groups in a Workgroup server

    Hi There, could you please explain on how to get a complete list of local users and local groups in a "Workgroup" server to which they belong to using Powershell. I'm able to get the users list but couldn't find any help in finding
    the script to find to which localgroup the user belong to. Anticipating your response. Also let me know the cmdlet for Win2k3 servers to find the same.

    Here's some code from David Pham (don't remember wher I fund this code):
    Trap {"Error: $_"; Break;}
    Function EnumLocalGroup($LocalGroup)
    $Group = [ADSI]"WinNT://$strComputer/$LocalGroup,group"
    "Group: $LocalGroup"
    # Invoke the Members method and convert to an array of member objects.
    $Members= @($Group.psbase.Invoke("Members"))
    ForEach ($Member In $Members)
    $Name = $Member.GetType().InvokeMember("Name", 'GetProperty', $Null, $Member, $Null)
    $Name
    # Specify the computer.
    $strComputer = gc env:computername
    "Computer: $strComputer"
    $computer = [adsi]"WinNT://$strComputer"
    $objCount = ($computer.psbase.children | measure-object).count
    $i=0
    foreach($adsiObj in $computer.psbase.children)
    switch -regex($adsiObj.psbase.SchemaClassName)
    "group"
    { $group = $adsiObj.name
    EnumLocalGroup $group }
    } #end switch
    $i++
    } #end foreach

  • Listing of Users with associated Groups

    Is there an easy way to generate a listing of APEX users and their associated groups? I know how to get the current user and how to determine what groups they are part of, but am looking for a simple query I can run to generate a complete list of Users and their associated groups.
    Thanks

    if you want to return the application groups that a user is assigned to, you can use the WWV_FLOW_GROUP_USERS intersection table. For example;
    SELECT group_name
    FROM wwv_flow_group_users
    WHERE user_id = (SELECT user_id
    FROM wwv_flow_users
    WHERE user_name ='MRITTMAN')
    would list out all of the groups that the user 'MRITTMAN' belongs to
    So to get all users and their groups, remove the where clause..
    (You will need read rights to the view, some dba's deny read rights to these objects in the name of security..)
    Thank you,
    Tony Miller
    Webster, TX

  • LDAP groups from User View

    Hi All,
    Can anyone tell me how I can retrieve the LDAP groups from a User View? When I retrieve a user View I don't see where the LDAP groups are located on the View. Is there an attribute I'm missing or is there an alternative mechanism to retrieve the LDAP groups from a User view?

    In the user view, you will have to customize the user view form per documentation. Add a multi-select field if editing, or a list/text area using the ldapGroups from the resource. You can find more on ldapGroups in the documentation for resource adapters. Sample code also helps.

Maybe you are looking for

  • Why does my iphone have duplicate songs with an icon?

    Recently I've noticed something on my iPhone.  Maybe it's been there all along, who knows.  But here's the deal: if I buy an album on iTunes for Mac, and sync my iPhone, the album on he phone looks bizarre: As you can see, there's a duplicate of each

  • PI 7.1 EHP1 Upgrade

    Hi, I was trying to find a guide that can help me with the installation or upgrade of a PI 7.1 SAP System to EHP1 PI 7.1 (I beilve that its 7.11 for EHP1) I tired to find guide / notes for this but was in vain. My search is on ...Please let me know i

  • Cannot adjust time as user, no printing either in KDE, arch 32 bit

    Hi,          I installed ntp, and tried to adjust time as it is aways wrong. Down South here in Oz it lookks liike we are in Canada or Europe! It asks for root password to auto update it from a time server, but says it is not system policy and then r

  • FaceTime to call a Pre-recorded Video?

    I don't know if this is the right place. I would like to create "something" where a user could dial an actual number via FaceTime and reach a pre-recorded video viewable through FaceTime. For example, lets say I want a person to call 555-1234 via Fac

  • Osx 10.9.5 multiple duplicates of same draft or email in Mail. If I search mail, sometimes 15 copies appear.

    For the past months, MAIL does not seem to be working right. Sometimes it stores 15 copies of the same mail, sometimes the drafts stay in the draft's folder after they have been sent, sometimes not. Some mails disappear altogether. I also feel that t