Open Active Directory Users and Computers on AD and switch the view to Advanced Features. Attribute Editor tab will not be visible under user properties unless you switched to Advanced Features view.
Now open user properties and switch to “Attribute Editor” tab.
On this case the attribute that I will use be using is “Employee Number“. This might vary on your requirement.
Double click on intended attribute. Then add the desired value.
Then browse to “Central Administration -> Application Management -> Manage Service Applications -> User Profile Service Application“. You will get the screen shown below.
Click on Manage User Properties. Then click on “New Property” from the screen below.
Add details related to property.
If you are to user this attribute in InfoPath forms make sure you make a note of “Name” added.
Click on “Show in the profile properties section of the user’s profile page” if you want to show the property in User’s Profile page.
Then select related “Attribute”. In my case its “EmployeeNumber”
Then click on Add to add the property.
Click ok to confirm your action.
New Property will be listed under “Custom Properties” in “Manage User Properties”
In order get the “EmployeeNumber” you have to run a “User Profile Full Synchronization”
If you have done this successfully attribute can be seen under user properties.
If you are to use the attributes in InfoPath form filter the value returned from “GetUserprofileByName” by “EmployeeNumber”
NOTE: Filter value is same which you added to “Name” in Step 05
When user opens the form his Employee Number will be automatically picked from AD attribute.
Hope this will be helpful 🙂