SharePoint User Profiles Write Back to Active Directory#

Via Bill English, a tip from Ward Ralston about how to write SPS user profile properties back to the Active Directory. Kind of dangerous action, but in some cases very usefull to update the properties in the AD that are normally never updated .

Anyway, the tip:

“First, schedule the profiles to import daily from Active Directory to SharePoint Portal Server 2003.

Then, do this:

Allow users to edit some of their mapped AD attributes in their profile (Last Name, Title, Room, etc).  You can also make an HR group in Active Directory that has the edit profile permission so HR could change any user too.

Thirdly, use MIIS to query the profile database to extract those attributes on a defined schedule…….Something like this:

select ntName, max(title) as Title, max(sn) as sn, max(givenName) as givenName, min(objectGUID) as objectGUID
from (select ntName, propertyVal,
(case when propertyid = 13 then propertyVal else '' end) as Title,
(case when propertyid = 4 then propertyVal else '' end) as sn,
(case when propertyid = 5 then propertyVal else '' end) as givenName,
(case when propertyid = 1 then propertyVal else '' end) as objectGUID
from userProfileValue upv inner join userProfile up
on upv.recordid=up.recordid
where propertyid in (13, 4, 5, 1)) as tbl
group by ntName
order by ntName

Lastly, have MIIS write the changes back to AD so it they  are reflected on the next replication cycle. (MIIS also wrote the change to a MySQL HR database)

Viola!  You can have the attributes that users fill out in their profile written back to Active Directory.”

Wednesday, August 31, 2005 6:02:33 AM UTC #     | 

 

All content © 2012, Mart Muller
On this page
This site
Calendar
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
Archives
Sitemap
Disclaimer

Powered by: newtelligence dasBlog 1.9.7174.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts