Get Manager attribute from AD 2003

Guys, Is there anyway to retrieve the value of "manager" attribute for a specific user defined on Active directory (windows 2003), any example will be higly appreciated as i am trapped. Thank u

If you know the user name you could simply just retrieve the "manager" attribute. For example:.....
String userName = "CN=Albert Einstein,OU=Research,DC=antipodes,DC=com";
// Create the initial directory context
LdapContext ctx = new InitialLdapContext(env,null);
// Retrieve all attributes of the requested object
Attributes attrs = ctx.getAttributes(userName);
// Print out some of the attributes
System.out.println("DN: " + attrs.get("distinguishedName").get());
System.out.println("Manager: " + attrs.get("manager").get());
.....Alternatively if you are performing a search, again just specify the manager attribute in the list of attributes to be returned. ....
//Specify the attributes to return
String returnedAtts[]={"sn","givenName","mail","manager"};
searchCtls.setReturningAttributes(returnedAtts);
//Specify the search scope
searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
//specify the LDAP search filter
String searchFilter = "(&(objectClass=user)(mail=*))";
//Specify the Base for the search
String searchBase = "DC=Antipodes,DC=Com";
....Note the corresponding backlink to the manager attribute is the directReports attribute.

Similar Messages

  • Manager attribute from AD and to AD

    Hello Experts,
    I am working with AD-IDM implementation.
    I am facing two problems here:
    1. Issue in getting Manager attribute of the users from HR system onto IDM via initial load and
    2. Issue in assigning the Manager attribute to a user from IDM while creating a new user on AD
    In case 1, I am simply trying to pass the manager in HR system to attribute MX_MANAGER as
    in pass 'to identity store' ->  MX_MANAGER = %manager%
    For this, the IDM throws an error as "Entry reference value is not numeric when storing attribute MX_MANAGER=xyz"
    In case 2, while creating a new identity assigning the AD privilege, I am trying to assign the manager to that new AD user. But it fails to create a user on AD as the manager attribute value comes with an error "CONSTRAINT_ATT_TYPE"
    I know that the manager value on AD resides in DN format, but not sure how to resolve that to use the same for purposes.
    Could you please suggest on the above issues.
    FYKI - Version: IDM 7.2
    Many thanks in advance!
    Naveen

    Hi Naveen,
    In order to start writing scripts, you should know what are the tables/views to query for getting the required information.
    I strongly recommend you to go through the the blog IDM SQL Basics #1: Queries against the Identity Store by  Per Krabsetsve
    Anyways I am writing down the sample scripts for your reference, which you can make use of.
    Let me know for any further queries.
    1. For getting the MSKEY of the user from MSKEYVALUE
    // Main function: z_sap_getMskeyForMskeyvalue
    function z_sap_getMskeyForMskeyvalue(Par)
      var msKey = "";
      msKey = "select distinct mcMSKEY from idmv_entry_simple where mcMSKEYVALUE='"+Par+"'";
      msKey = uSelect(msKey);
      return msKey;
    2.  For gettting the DN of the Manager with MSKey as the input to the script.
    // Main function: z_sap_getManagerADDN
    function z_sap_getManagerADDN(Par)
       var msKey = Par;
      var managerADDN = "";
      managerADDN = "select avalue from idmv_value_basic where MSKEY="+Par+" and AttrName='ACCOUNTIDECAD'";
      // in the above select query ACCOUNTIDECAD is my AD account attribute. In your case it is ACCOUNT<AD Rep Name>
      managerADDN = uSelect(managerADDN);
      return managerADDN;
    All the best !!
    ~ Krishna.

  • Getting User Attributes from an Active Directory LDAP

    Hello all.
    I want to extract attributes assigned to a user in the Active Directory LDAP and make them available through the getPropertyValue property in Javascript. I know that a user's System Attributes can be accessed with getPropertyValue but I have not found a way to get specific attributes from the LDAP and make them available as specific attributes in xMII. System attributes like "EmailAddress1" seem to transfer from the LDAP but others don't. Anyone have any ideas?
    Thanks.
    ...Sparks

    Sparks,
    If you're using 11.5 or 12 actually they should all map into the system as session properties.  You can use the following URL to verify your session properties:
    http://<xMIIServer>/Lighthammer/PropertyAccessServlet?Mode=List
    If you are not seeing the attributes you expect then your Attribute Query for User or Role is incorrect for your LDAP system and you need to change the LDAP configuration queries.
    -Sam

  • Not able to get the attributes from HttpSession

    hi all,
    i'm using session.setAttribute() in a jsp to put an attribute in the session and when i try to get that attribute in another jsp it's not giving the value. But the getAttribute() mehods is giving the value in the same jsp page where i used the setAttribute() method.
    pls help,
    regards chandu

    If you are using IE go to tool and then internet options and look under privacy for you cookie status(this will vary version).
    To use URL rewriting all you have to do is one of two things:
    www.url.com?parm=value&param2=value
    or if the value is a result of a java expression or is a java variable you can do
    www.url.com?parm=<%=variable%>&param2=<%=(variable +1)%>
    You get the values from url rewriting by using request.getParameter or getParameterValues(used when multiple values are getting passed).
    When data is retrieved using getParameter it always comes back as a string and you should trim them as well.
    HTH,
    J.Clancey

  • How can I get sigalg attribute from a given X509 certificate

    Hi,
    I am verifying my client's digigital signature like this
    String sigalg = "SHA1WithRSA";
    Signature sig = Signature.getInstance(sigalg);
    sig.initVerify(pubKey);
    sig.update(sEnvelope.getBody().toString().getBytes());
    return sig.verify(Base64.decode(sigValue));
    while getting signature instance, rightnow I am hardcoding that to "SHA!withRSA", because I know that client is comming with that signatureAlgorithm, If another client comes with another alogorithm say "MD5withRSA", it is going to be failed. how can I change that sigAlg variable dynamically, based on different signature ?? what I have from the client is certificate file. how can I get signature algorithm from the certificate or from publicKey object ??
    Thanx, Venu

    Check the following methods in X509Certificate:
    getSigAlgName
    getSigAlgOID

  • Trying to get EMAIL_ADDRESS attribute from the SECURITY_CONFIGURATION.

    I am currently editing an existing script that retrieves the list of administrators of a workspace in Oracle Content Services by using the SECURITY_CONFIGURATION and GRANTS attributes. I am trying to find the easiest way that I can retrieve the email address of the accounts that it retrieves as adminsitrators. Here are the attribute requests that are in the code currently:
    Item[] Grants = (Item[]) FdkUtils.getAttribute(folderContents[ind], Attributes.SECURITY_CONFIGURATION + FdkConstants.SEPARATOR + Attributes.GRANTS);
    Item grantee = (Item)FdkUtils.getAttribute(Grants[gind], Attributes.GRANTEE);
    Item[] role = (Item[])FdkUtils.getAttribute(Grants[gind], Attributes.ROLES);
    Any help would be greatly appreciated.
    Thank you,
    Dustin

    Try something like the following (using Content Services utility classes in place of the Content DB classes)
    Special note..
    Notice how we are requesting in the SECURITY_CONFIGURATION_GRANTS_ATTRIBUTES request array for the GRANTEE, and for the GRANTEE, associated attributes from USER_ATTRIBUTES (which is EMAIL_ADDRESS).
      public static final AttributeRequest[] USER_ATTRIBUTES =
        new AttributeRequest[]
          ClientUtils.newAttributeRequest(Attributes.EMAIL_ADDRESS),
       * ROLE item type attributes.
       * Includes PROPAGATING, CUSTOMIZABLE, etc.
      public static final AttributeRequest[] ROLE_ATTRIBUTES =
        new AttributeRequest[]
          ClientUtils.newAttributeRequest(Attributes.PROPAGATING),
          ClientUtils.newAttributeRequest(Attributes.CUSTOMIZABLE),
          ClientUtils.newAttributeRequest(Attributes.REGISTRATION_KEY),
          ClientUtils.newAttributeRequest(Attributes.ACCESS_LEVEL),
       * GRANT item type attributes.
       * Used to retrieve the details of a particular grant, including the
       * GRANTEE and the ROLES granted
      public static final AttributeRequest[]
        SECURITY_CONFIGURATION_GRANTS_ATTRIBUTES = new AttributeRequest[]
          ClientUtils.newAttributeRequest(Attributes.GRANTEE, USER_ATTRIBUTES),
          // roles specified on a grant
          ClientUtils.newAttributeRequest(Attributes.ROLES, ROLE_ATTRIBUTES),
          // Whether the grant includes any Roles only realized when in admin mode
          ClientUtils.newAttributeRequest(Attributes.HAS_ADMIN_ROLES),
          // Whether the grant includes any Roles only realized when in normal mode
          ClientUtils.newAttributeRequest(Attributes.HAS_NORMAL_ROLES),
          // Whether security configuration grant is propagating
          ClientUtils.newAttributeRequest(Attributes.PROPAGATING),
          // Folder from which a security config grant is propogated from
          ClientUtils.newAttributeRequest(Attributes.PROPAGATED_FROM),
       * SECURITY_CONFIGURATION item type attributes.
       * Used to retrieve the security GRANTS.
      public static final AttributeRequest[] SECURITY_CONFIGURATION_ATTRIBUTES =
        new AttributeRequest[]
          // all grants for security config
          ClientUtils.newAttributeRequest(Attributes.GRANTS,
            SECURITY_CONFIGURATION_GRANTS_ATTRIBUTES),
          // grants on security config propagated from a parent's security config
          ClientUtils.newAttributeRequest(Attributes.PROPAGATED_GRANTS),
       * DOCUMENT / FOLDER item type security configuration attribute details.
       * Used to retrieve the security configuration information details for the
       * document/folder item.
      public static final AttributeRequest[] ITEM_SECURITY_CONFIGURATION =
        new AttributeRequest[]
          ClientUtils.newAttributeRequest(
            Attributes.HAS_EXPLICIT_SECURITY_CONFIGURATION),
          ClientUtils.newAttributeRequest(Attributes.SECURITY_CONFIGURATION,
            SECURITY_CONFIGURATION_ATTRIBUTES)
    Item folder = ...;
    CommonManager commonM = session.getCommonManager();
    folder = commonM.getItem(folder.getId(), ITEM_SECURITY_CONFIGURATION);
    Item securityConfig = (Item) CommonUtils.getAttribute(folder, Attributes.SECURITY_CONFIGURATION);
    Item[] grants = (Item[]) CommonUtils.getAttribute(securityConfig, Attributes.GRANTS);
    int length = (grants == null) ? 0 : grants.length;
    for (int gind=0; gind<length; gind++)
      Item grantee = (Item) CommonUtils.getAttribute(grants[gind], Attributes.GRANTEE);
      String email_address = (String) CommonUtils.getAttribute(grantee, Attributes.EMAIL_ADDRESS);
    }-Matt.

  • Getting calendar events from exchange 2003

    Hi All,
    We have a requirement of getting the calendar items from exchange server 2003 using web dav , jakarta slide
    initially we made a connection and retrieve the mail items from server
    we use search method of org.webdav.lib.httpclient.method.search method to search and retrieve the responses
    can any one say how to build an XML request for retrieving calendar events from exchange and how to parse the search method response from and retrieving it.
    it would be more helpful if any one throw some light on this
    thanks in advance,
    Sasikumar

    myscreen-sasi wrote:
    We have a requirement of getting the calendar items from exchange server 2003 using web dav , jakarta slide This forum is for Sun Calendar Server and has nothing to do with Microsoft Exchange or web-dav programming. I suggest asking on a different forum e.g. java programming:
    http://forums.sun.com/forum.jspa?forumID=31
    Regards,
    Shane.

  • How to get user attributes from LDAP authenticator

    I am using an LDAP authenticator and identity asserter to get user / group information.
    I would like to access LDAP attributes for the user in my ADF Taskflow (Deployed into webcenter spaces).
    Is there an available api to get all the user attributes through the established weblogic authenticator provider or do i have to directly connect to the LDAP server again?
    Any help would be appreciated

    Hi Julián,
    in fact, I've never worked with BSP iViews and so I don't know if there is a direct way to achieve what you want. Maybe you should ask within BSP forum...
    A possibility would be to create a proxy iView around the BSP iView (in fact: before the BSP AppIntegrator component) which reads the user names and passes this as application params to the BSP component. But this is
    Beginner
    Medium
    Advanced
    Also see http://help.sap.com/saphelp_nw04/helpdata/en/16/1e0541a407f06fe10000000a1550b0/frameset.htm
    Hope it helps
    Detlev

  • Need to get EMAIL_ADDRESS attribute from SECURITY_CONFIGURATION

    I am currently editing an existing script that retrieves the list of administrators of a workspace in Oracle Content Services by using the SECURITY_CONFIGURATION and GRANTS attributes. I am trying to find the easiest way that I can retrieve the email address of the accounts that it retrieves as adminsitrators. Here are the attribute requests that are in the code currently:
    Item[] Grants = (Item[]) FdkUtils.getAttribute(folderContents[ind], Attributes.SECURITY_CONFIGURATION + FdkConstants.SEPARATOR + Attributes.GRANTS);
    Item grantee = (Item)FdkUtils.getAttribute(Grants[gind], Attributes.GRANTEE);
    Item[] role = (Item[])FdkUtils.getAttribute(Grants[gind], Attributes.ROLES);
    Any help would be greatly appreciated.
    Thank you,
    Dustin

    Hi,
    somehow I feel this is the wrong list for this question. or how does this relate to JDeveloper and ADF (except for that we also program in Java)
    Frank

  • Xpath: get attributes from first child node

    Hi,
    I have some problems by getting the attributes from the first child node, if i try to get child elements everything works fine, but whenever i need the elementvalue from a node with attributes i doesn't return anything.
    The xpath expression works fine if i want to get the element value from all childs, but not when i just want from one of them.
    This one works,
    XPathFactory factory1 = XPathFactory.newInstance();
        XPath xpath = factory1.newXPath();
        xpath.setNamespaceContext(new PersonalNamespaceContext());
        XPathExpression expr
         = xpath.compile("//default:DeviceExchange[1]/default:Status/text()");
       // gets the value of the node picked out
        Object result = expr.evaluate(doc, XPathConstants.NODESET);
        NodeList nodes = (NodeList) result;
        for (int i = 0; i < nodes.getLength(); i++) {
          names[i] = nodes.item(i).getNodeValue();
          String a = names;
    // checks if status is exchanged, if it is sets status to 1
    if (a.length() == 9){
    names[i] = "1"; }
    else{  names[i] = "0";}
    System.out.println(names[i]);This doesn'tXPathFactory factory2 = XPathFactory.newInstance();
    XPath xpath2 = factory2.newXPath();
    xpath2.setNamespaceContext(new PersonalNamespaceContext());
    XPathExpression expr2 = xpath2.compile("//default:DeviceExchange[1]/default:Field[@names='MLPKTID']/text()");
    Object result2 = expr2.evaluate(doc, XPathConstants.NODESET);
    NodeList nodes2 = (NodeList) result2;
    for (int i = 0; i < nodes2.getLength(); i++) {
    names2[i] = nodes2.item(i).getNodeValue();
    System.out.println(names2[i]);}Does anyone have any ideas? I will apreciate all help!
    Edited by: fusen on Oct 25, 2007 1:12 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sorry, solved myself. Just � typo that that i couldn't detect.

  • In Which table can I get Customize attribute values?

    Hi All,
    I am new to Solution Manager. I have created customize attributes using std and non std ways. And i have used this attributes for create interface scenarios.
    My problem is, I am not able to get the value of attributes which has created using standard way. From which table I can get.
    While create this std attributes, i have added customize table name and corresponding field name in attribute properties.
    Can I get the attributes from this customize table?
    Kindly any one help for me.
    Thanks in Advance.
    -Thulasi

    Hi tulsi,
    I am also looking for the same solution please update me or the thread with the solution
    Saurabh

  • Reflection: attributes from the base class

    Is there a way to get the attributes from the base class of a derived class via reflection? I only found methods to get the attributes from the derived class.
    Example:
    class A
    int a = 4;
    class B extends A
    int b = 5;
    Object unknown = new B();
    Code/Idea to get all attributes from baseclass A using unknown (here: a=4)?

    Thank you all for your hints. The mistake I make, was to use the baseclass, and not the derived class for getting the attributes. By using an extra parameter of type class I got all attributes in their context.
       private StringBuffer getDump(Object obj, Class cl)
             dmp.append(cl.getName() + " {\n");
             Field[] attribute = cl.getDeclaredFields();             <--- only the fields of the current class
             for (int j = 0; j < attribute.length; j++)
                attribute[j].setAccessible(true);
                try
                   if (attribute[j].getType().isPrimitive() || attribute[j].getType() == String.class)
                      dmp.append(attribute[j].getName() + "=" + attribute[j].get(obj) + "\n");
                   else
                      if (((attribute[j].getModifiers() & Modifier.STATIC) != Modifier.STATIC) &&
                          (attribute[j].getType().getName().startsWith("java.lang") == false) &&
                          ((attribute[j].getModifiers() & Modifier.FINAL) != Modifier.FINAL))
                         dmp.append(getDump(attribute[j].get(obj), attribute[j].get(obj).getClass())); <- recursive call
                catch (IllegalAccessException ex)
                   ex.printStackTrace();
             dmp.append("}");
          return dmp;
       }

  • How to Get static attributes dynamically

    Hi,
    I have to get static attributes from the context dynamically is it possible?
      DATA node     TYPE REF TO if_wd_context_node.
      DATA element  TYPE REF TO if_wd_context_element.
      node = wd_context->path_get_node( path = path_node ).
      element = node->get_element( ).
      element->set_static_attributes( static_attributes = ??? ).
    Thank you in advance.
    Miguel

    Hi ,
    i would suggest to use CL_ABAP_STRUCTDESCR
    cl_abap_typedescr=>describe_by_data

  • URGET!!! Get Session Attribute On Form

    Hi alls,
    I develope application with Forms 9i and JSP.My Application Program is developed by Forms 9i but Menu,that call application program,is developed by JSP.I knew that if I want to call a Form from JSP,I have to append &otherparams on URL.
    My Problems is :
    1.I want to get some parameters,is seted to session attribute in JSP,from Menu to Forms and don't let the users to see these parameters on URL. HOW CAN I DO? (URGENT!!!!)
    2.If I want the Menu always display on top and application display on botton of browser. HOW CAN I DO?
    Thank you for advance.
    PS. Menu develop in dropdown style,it will expand(drop) when move mouse on it.

    Hi,
    1.I want to get some parameters,is seted to session attribute in JSP,from Menu to Forms and don't let the users to see these parameters on URL. HOW CAN I DO? (URGENT!!!!)
    You can't get session attribute from Forms because it runs as an Applet in the browser and does not have access to the server side request object.
    You can access request parameters that are used to call Forms, but that's it.
    2.If I want the Menu always display on top and application display on botton of browser. HOW CAN I DO?
    Use HTML frames
    Frank

  • Unable to manage Distribution list membership since moving from Exchange 2003 to Exchange 2010

    Hi,
    We have recently started migrating from Exchange 2003 to Exchange 2010.  One of our customers used to be able to manage a security group through the outlook address book.  This is a mail enabled security group where the customer is on
    the "Managed by" entry and the "Manager can update membership list" is ticked. 
    Now that the users mailbox has been migrated to Exchange 2010, if they try and modify the membership using outlook by finding the group in the address book they get the error "changes to the distribution list membership cannot be saved. you do not have
    sufficient permission to perform this operation on this object".
    I have now added a test account to the managed by entry on the security group to test the problem.
    I have followed the article
    http://blogs.technet.com/b/exchange/archive/2009/11/18/3408844.aspx that explains how to use the EMS to give users the right to amend groups that users own.  I did not run the script but entered the following commands:
    New-ManagementRole -name “MyDistributionGroupsManagement_Test” -parent MyDistributionGroups
    Remove-ManagementRoleEntry “MyDistributionGroupsManagement_Test\New-DistributionGroup” -confirm:$false
    Remove-ManagementRoleEntry “MyDistributionGroupsManagement_Test\Remove-DistributionGroup” -confirm:$false
    New-ManagementRoleAssignment -name “MyDistributionGroupsManagement_Test-Default Role Assignment Pol” -role “MyDistributionGroupsManagement_Test” -policy “Default Role Assignment Policy”
    All appears to have worked ok and I have seen no errors while doing this
    If I use OWA and then use the ECP, I can now see the "Public groups I own" but no groups are listed.
    I have created some new distribution groups in Exchange 2010 (One dist list and one security group) to test and added the test account as an owner of both and a member of both.  I still cannot amend the membership using outlook address book and the
    ECP still shows no groups under "Public Groups I own"
    I have seen a number of articles on how to do this and it looks like I am doing everything right and it has worked for plenty of other people.  I just don't know what's going wrong.
    I would be very grateful if anyone can help. 
    Matt

    Hi Rajith,
    I deleted the outlook profile and recreated it but this did not work.
    I have now created a brand new mailbox on Exchange 2010 added this to the "managed by" section of the Exchange 2010 dist lists and I still get the error.  I also do not see the groups listed when logging in as that user to OWA ECP and clicking on the
    Groups link.
    I had a look at the link you sent me and I could see that from the Exchange server when I opened the User roles to get to the ECP, clicked on Roles and Auditing and then User Roles the only policy applied is "Default role assignment".  When I select
    the details for this, under Distribution groups, "My Distribution Groups" is not ticked but my new one that I created "My DistributionGroupsManagement_Test" is.  So this looks ok.
    Any other ideas?
    Matt

Maybe you are looking for

  • Error in writing to file '/u01/app/oracle/product/10.2.0/lib/libocr10.so'

    I am in middle of Oracle 10.2.0.3 pachest installation and getting this error: Error in writing to file '/u01/app/oracle/product/10.2.0/lib/libocr10.so' I shutdown database and listenter prior to start of upgarde. Any idea? OS AIX 5.2

  • How do I parse a web page via a URL in the clipboard

    Hi. I would like to read the html source of a web page into a string variable. The contents of the clipboard contains the URL. How do I do this ? Regards, Harry W. PowerMac G5 Dual 2.5GHz   Mac OS X (10.4.3)  

  • Problem with invitation to windows users

    Hello, When I send an invitation through iCal to a Pc/Windows user, he can't open the invitation and put it in outlook. Have you any idea about that problem ? Thanks Gilles.

  • SUP HWC Operation Return Values

    Hello SCN, I am having a problem with a Client Initiated HWC application. The application has 1 MBO which has an Operation attached to it. The MBO queries SAP and return the details of a Purchase Requisition using the SAP standard BAPI. Once the user

  • Phone got dropped, SIM Locked, screen frozen

    Phone got dropped GRRRRRR, Sim now locked. I Know the code but the screen has frozen at max enlargement so I can't get access to keypad. Have tried removing SIM and rebooting numerous times. No luck. Can someone help? S