none
profile synchronization problem RRS feed

  • Question

  • i've setted up successfully user profile service, configured AD sync with special account for connection, configured additional fields in profile, set up part of fields to be exported to AD. 

    All was fine. And at some moment later I've mapped two date fields to custom AD attributes. here I've got a problem: date fields are not exported. in the same time other fields are exported successfully.

    throubleshooting steps, I've taken:

    1. restart of iis and OWSTIMER many times.

    2. started full sync many times

    3. tried to change regional settings (formats) of farm account and connection account to English(US). This possible solution I've got from one page somewhere. But it not work. I've changed settings through runas launch of cpl.

    Nothing helped me out. 

    My god, I cant believe this simple standard feature is so hard to be configured.

    I am ask for help of someone, who is smart enough to find solution for this damned thing, which burns out all my mind.

    Please, HELP!!!!

    And the other thing, which I missed in 3 step. What are regional settings, AD services are running with on windows 2003 R2? I cannot find how to check it out. But i think it will not help anycase.

    Tuesday, February 14, 2012 9:30 PM

Answers

  • Fortunatly, I resolved the situation after a very long discovery process.  And now I think, it is definitely the bug in sharepoint. I dont know if it is a bug in admin tool or in sharepoint rule extensions library. But it is a bug, I am sure.

    When setting synchronization of date type property from sharepoint profiles to AD, this flow is not configured in FIM properly. In my case, profile property is pushed in localized format, while AD attribute (UTC time) requires "yyMMddHHmmssZ" format. And sharepoint do not configure FIM to convert value properly. So I've got syntax error. And there is no way to fix it through UI or some sharepoint tool.

    So I has to learn a lot information about FIM and FIM development, and written my own rules extention library. This extension I connected to "Sharepoint-side" management agent (with type "extensible connectivity"). Some time for debug, and now my dates are synchronized.

    If u got the same problem, this is only single solution I found.

    First, here is docs about rules extension library creation process:
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms695363.aspx

    You will need to reference this dll to write rules extensions library: C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\Bin\Assemblies\Microsoft.MetadirectoryServicesEx.dll

    Next, here is the only usefull code in my library (remember, my dates are go from SP to AD):

        public class SpFimExtension : IMASynchronization 
        {
    	//...
    
            public void MapAttributesForImport(string FlowRuleName, CSEntry csentry, MVEntry mventry)
            {
                if (FlowRuleName == "cd.user:SPS-HireDate->mv.person:SPS_MV_UTCTime_SPS-HireDate")
                {
                    var src = csentry["SPS-HireDate"].StringValue;
                    var dt = DateTime.Parse(src, CultureInfo.CurrentCulture);
                    var dstFormat = dt.ToString("yyMMddHHmmssZ");
                    byte[] data = Encoding.UTF8.GetBytes(dstFormat);
                    mventry["SPS_MV_UTCTime_SPS-HireDate"].BinaryValue = data;
                }
            }
    	//...
        }

    all other methods in my class throw EntryPointNotImplementedException, except Initialize and Terminate, which are empty. csentry contains properties of sharepoint, mventry - fields of FIM objects, which will be synchronized with AD later. 

    Make sure the class is public.

    And at last, u need to make some changes to FIM config manualy.

    Start "C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe"

    Now find sharepoint-side agent:

    Now, open it's properties. Then "Configure Attribute Flow" -> find and select atribute flow with problem atribute -> Select "Advanced" -> Press "Edit" button -> Select rules extension -> Memorize rule name, and names of atributes at both sides (u need it to write code of rule extension).

    now change code of rule extension, so it contains your specific names.

    Build it.

    copy dll to C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\Extensions



    • Edited by VlH Friday, March 2, 2012 8:57 PM
    • Marked as answer by VlH Friday, March 2, 2012 9:01 PM
    Friday, March 2, 2012 8:50 PM
  • ...  next set up rules extesions library:


    Now save and start profile synchronization from Sharepoint Central Administration. 

    U can see progress and errors in FIM utility we used to manualy configure FIM:


    If u need to debug your library, make sure u buld library in debug mode, and attach Visual Studio to miiserver process before u start synchronization.

    Thats all. I hope this solution will be helpfull for someone. I've spent several days to find it. And it was real hell.

    • Marked as answer by VlH Friday, March 2, 2012 9:02 PM
    Friday, March 2, 2012 8:54 PM

All replies

  • I cant believe it. Is there realy nobody knows how to deal with my problem?
    Thursday, February 16, 2012 8:08 AM
  • Hi ,

    Please try to delete the old data in “User Information List” and then forcing the sync operation for both the Profile Sync. & Quick profile Sync. Jobs.

    Here are two helpful links about this issue:

    http://blog-sharepoint.blogspot.com/2010/08/user-information-list-not-synchronised.html

    http://sharepointnotes.wordpress.com/2008/05/05/syncing-wss-and-moss-user-profile-properties-with-active-directory/

    Thx

    Surendra


    Surendra Singh, MCITP: SharePoint Administrator 2010

    Thursday, February 16, 2012 8:20 AM
  • Do u think it could help? 

    I miss values in AD, not in User Information List or in Profile.

    These values are written in profile through API of profile service, and then I expect them to be exported to AD.

    Thursday, February 16, 2012 8:36 AM
  • Hi.

    The 'this simple standard feature' is the hardest to configure by far in all of SharePoint history, it is doable though!

    The best source of information on the User Profiel Service would be Spencer Harbars blog at http://www.harbar.net. Search for answers there.

    Regards


    Thomas Balkeståhl - Technical Specialist - SharePoint - http://blksthl.wordpress.com

    Thursday, February 16, 2012 8:45 AM
  • i've tried this source, but still cannot resolve problem.

    i've checked security rigths on target AD-account, i've recreated synchronization connection and schema. all field are exported and imported, except dates. I have three date fields to export and no one exported.

    Thursday, February 16, 2012 4:48 PM
  • I am still have problems with this. Its a hell.

    Th FIM utility (C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe) shows me error:

    "syntax-violation" "The parameter is incorrect."

    I guess it is about my date attribute, couse it is not shown on other tabs.

    I dont how to further troubleshoot it.

    Thursday, March 1, 2012 7:53 AM
  • Hi.

    You could try to open a thread in the ILM forum? Identity Lifecycle Manager, Perhaps you could get some pointer to the FIM error there.

    Regards


    Thomas Balkeståhl - Technical Specialist - SharePoint - http://blog.blksthl.com

    Thursday, March 1, 2012 7:58 AM
  • oh, ok, ill try
    Thursday, March 1, 2012 8:12 AM
  • My god, I decoded exported value from Preview it is

    "01.02.2012 0:00:00"  (rus loc)

    OMG, how could this shit be... 

    THIS IS STANDARD FEATURE, how could it be that it was tested zero times???

    Anybody knows how to direct sharepoint to pass date value in right format?

    Thursday, March 1, 2012 9:42 AM
  • Fortunatly, I resolved the situation after a very long discovery process.  And now I think, it is definitely the bug in sharepoint. I dont know if it is a bug in admin tool or in sharepoint rule extensions library. But it is a bug, I am sure.

    When setting synchronization of date type property from sharepoint profiles to AD, this flow is not configured in FIM properly. In my case, profile property is pushed in localized format, while AD attribute (UTC time) requires "yyMMddHHmmssZ" format. And sharepoint do not configure FIM to convert value properly. So I've got syntax error. And there is no way to fix it through UI or some sharepoint tool.

    So I has to learn a lot information about FIM and FIM development, and written my own rules extention library. This extension I connected to "Sharepoint-side" management agent (with type "extensible connectivity"). Some time for debug, and now my dates are synchronized.

    If u got the same problem, this is only single solution I found.

    First, here is docs about rules extension library creation process:
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms695363.aspx

    You will need to reference this dll to write rules extensions library: C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\Bin\Assemblies\Microsoft.MetadirectoryServicesEx.dll

    Next, here is the only usefull code in my library (remember, my dates are go from SP to AD):

        public class SpFimExtension : IMASynchronization 
        {
    	//...
    
            public void MapAttributesForImport(string FlowRuleName, CSEntry csentry, MVEntry mventry)
            {
                if (FlowRuleName == "cd.user:SPS-HireDate->mv.person:SPS_MV_UTCTime_SPS-HireDate")
                {
                    var src = csentry["SPS-HireDate"].StringValue;
                    var dt = DateTime.Parse(src, CultureInfo.CurrentCulture);
                    var dstFormat = dt.ToString("yyMMddHHmmssZ");
                    byte[] data = Encoding.UTF8.GetBytes(dstFormat);
                    mventry["SPS_MV_UTCTime_SPS-HireDate"].BinaryValue = data;
                }
            }
    	//...
        }

    all other methods in my class throw EntryPointNotImplementedException, except Initialize and Terminate, which are empty. csentry contains properties of sharepoint, mventry - fields of FIM objects, which will be synchronized with AD later. 

    Make sure the class is public.

    And at last, u need to make some changes to FIM config manualy.

    Start "C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe"

    Now find sharepoint-side agent:

    Now, open it's properties. Then "Configure Attribute Flow" -> find and select atribute flow with problem atribute -> Select "Advanced" -> Press "Edit" button -> Select rules extension -> Memorize rule name, and names of atributes at both sides (u need it to write code of rule extension).

    now change code of rule extension, so it contains your specific names.

    Build it.

    copy dll to C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\Extensions



    • Edited by VlH Friday, March 2, 2012 8:57 PM
    • Marked as answer by VlH Friday, March 2, 2012 9:01 PM
    Friday, March 2, 2012 8:50 PM
  • ...  next set up rules extesions library:


    Now save and start profile synchronization from Sharepoint Central Administration. 

    U can see progress and errors in FIM utility we used to manualy configure FIM:


    If u need to debug your library, make sure u buld library in debug mode, and attach Visual Studio to miiserver process before u start synchronization.

    Thats all. I hope this solution will be helpfull for someone. I've spent several days to find it. And it was real hell.

    • Marked as answer by VlH Friday, March 2, 2012 9:02 PM
    Friday, March 2, 2012 8:54 PM