MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Employee Lookup Question

  Asked By: Harshita    Date: May 13    Category: MOSS    Views: 651

We've got our MOSS 2007 development environment up and running.
Everyone is getting excited just over the Employee Lookup feature
being able to pull employee information from Active Directory. There's
two items though that are not in AD the we are being tasked to

1. Telephone Extension
2. Employee Number

From what I can see, AD does not have a field for either of these. Has
anyone else run into issue and if so, how where you able to solve the



3 Answers Found

Answer #1    Answered By: Kalpana Ghatge     Answered On: May 13

You can add those fields to Active Directory and include them in your user
profile. Assuming AD is the main source for employee  data ...

Answer #2    Answered By: Bobbie Rodgers     Answered On: May 13

The attributes 'employeeNumber' and 'telephoneNumber' are by default provided in Aprovided in AD.

The telephoneNumber is exposed by AD users and computers. However the 'employeeNumber' attribute is not.

Our programmers created a sync program which sync's our HR system to AD
to populate this info.

I guess with the user profile import in the SSP admin you could map the
employee number field to the attribute there,

And hence display the employee  number in users profiles in MOSS2007.

Answer #3    Answered By: Bhumi Gokhale     Answered On: May 13

Maybe this can help:

SPSite mySite = new SPSite(<your site url>);
SPWeb pWeb = mySite.OpenWeb( );
// You could get the user id or the SPUser in a different
// way, this is just an example
SPUser aUser = pWeb.AllUsers. GetByID(< user id here>);

ServerContext scon = ServerContext. GetContext( mySite);
UserProfileManager mgr = new UserProfileManager( scon);
UserProfile u = mgr.GetUserProfile( aUser.LoginName) ;

// Now you can collect the user profile information
string email = (string)u["WorkEmail"].Value;
string department = (string)u["Department"].Value

Didn't find what you were looking for? Find more on Employee Lookup Question Or get search suggestion and latest updates.