Skip to Content
avatar image
Former Member

UME connected to Active Directory. How to change what fields are available

I have successfully changed my UME to point to Active Directory. I'll describe process further on in post. My issue now is how to modify what AD fields will be available in UME and what UME fields they'll be 'mapped' to.

I'll try to describe the process I've gone through so far:

1) Download the 'dataSourceConfiguration_ads_readonly_db.xml' file from Config Tool

2) Renamed file and added the following:

a) in <responsibleFor><principal type="user"> <nameSpaces><nameSpace name="com.sap.security.core.usermanagement"><attributes> section I added a <attribute name="xxx"/> tag for each new field I wanted. 'xxx' is, of course, the name of the field

b) in <attributeMapping><principals><principal type="user"> <nameSpaces><nameSpace name="com.sap.security.core.usermanagement"><attributes> section I added a <attribute name="xxx"><physicalAttribute name="yyy"/></attribute> tag for each new field I wanted. 'xxx' is, of course, the name of the field in UME and 'yyy' is the field in the LDAP

Then I uploaded the new file into Config Tool and switched the "Data source configuration file" selection to that new file. Saved the change and restarted the engine.

When I ran some test code I was getting information back from the user's AD entry. For example, I tested the email field. This is a field that is not maintained in the UME but I got the correct value back so I knew it was getting it from AD.

Then I wanted to see if I could get one of the new fields. When I ran my test code the user.getXxx() method call returend null.

Since I knew that getting the e-mail worked I thought I'd change the mapping for the email UME field to point to the 'yyy' field in AD. I did this by making this change:

<b>FROM:</b>

 <attribute name="email">
    <physicalAttribute name="mail"/>
  </attribute>

<b>TO:</b>

  <attribute name="email">
    <physicalAttribute name="yyy"/>
  </attribute>

I then uploaded that new xml file and switched to it in Config Tool. Then I restarted the engine.

However, when I ran my test code (see below for snippet) it still shows the email value instead of the value of field 'yyy'.

Any help would be GREATLY appreciated.

<b>Web Dynpro code snippet:</b>

String input = "smith";
IUserFactory userFactory = UMFactory.getUserFactory();
try {
  IUserSearchFilter searchFilter = userFactory.getUserSearchFilter();
  searchFilter.setLastName(input, ISearchAttribute.LIKE_OPERATOR, false);
  ISearchResult searchResult = userFactory.searchUsers(searchFilter);
  while (searchResult.hasNext()) {
    String userID = (String)searchResult.next();
    IUser user = userFactory.getUser(userID);
    String email = user.getEmail();
  }
} catch (UMException e1) {
  //error handling
}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 25, 2007 at 06:57 PM

    Update. I uploaded the wrong file the 2nd time. When I changed the XML file to 'bind' theAD field to the 'email' UME field, my code did return the AD value when I did

    user.getEmail();

    However, I'm still not able to get the AD field bound to any other UME field that wasn't part of the default XML file.

    Is there something else I need to do besides adding the tags I described in my original entry?

    Thanks

    Add comment
    10|10000 characters needed characters exceeded