none
Azure AD Connect 1.1 Get-ADSyncScheduler : System.Runtime.Serialization.SerializationException RRS feed

  • Question

  • Hi everybody,

    I have installed Microsoft Azure Active Directory Connect 1.1

    https://www.microsoft.com/en-us/download/details.aspx?id=47594

    After Enabling Sync Cycle

    Set-ADSyncScheduler -SyncCycleEnabled $True

    I get an error when trying to Get-ADSyncScheduler

    Get-ADSyncScheduler : System.Runtime.Serialization.SerializationException: DateTime values that are greater than
    DateTime.MaxValue or smaller than DateTime.MinValue when converted to UTC cannot be serialized to JSON. --->
    System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: value
       --- End of inner exception stack trace ---
       at System.Runtime.Serialization.Json.JsonWriterDelegator.WriteDateTimeInDefaultFormat(DateTime value)
       at System.Runtime.Serialization.Json.JsonWriterDelegator.WriteDateTime(DateTime value)
       at WriteSchedulerSettingsToJson(XmlWriterDelegator , Object , XmlObjectSerializerWriteContextComplexJson ,
    ClassDataContract , XmlDictionaryString[] )
       at System.Runtime.Serialization.Json.JsonClassDataContract.WriteJsonValueCore(XmlWriterDelegator jsonWriter, Object
    obj, XmlObjectSerializerWriteContextComplexJson context, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.WriteDataContractValue(DataContract
    dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract,
    XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObjectContent(XmlWriterDelegator
    writer, Object graph)
       at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObject(XmlWriterDelegator writer,
    Object graph)
       at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object
    graph, DataContractResolver dataContractResolver)
       at System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(XmlDictionaryWriter writer, Object
    graph)
       at System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(Stream stream, Object graph)
       at Microsoft.IdentityManagement.PowerShell.ObjectModel.SchedulerSettings.Serialize()
       at SchedulerUtils.GetCurrentSchedulerSettings(_ConfigAttrNode* pcanList, UInt32 ccanItems, Char**
    syncSettingsSerialized, Char** errorString)
    At line:1 char:1
    + Get-ADSyncScheduler
    + ~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : WriteError: (Microsoft.Ident...ADSyncScheduler:GetADSyncScheduler) [Get-ADSyncScheduler]
       , PSInvalidOperationException
        + FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException: DateTime values that are greater th
       an DateTime.MaxValue or smaller than DateTime.MinValue when converted to UTC cannot be serialized to JSON. ---> Sy
      stem.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: value
       --- End of inner exception stack trace ---
       at System.Runtime.Serialization.Json.JsonWriterDelegator.WriteDateTimeInDefaultFormat(DateTime value)
       at System.Runtime.Serialization.Json.JsonWriterDelegator.WriteDateTime(DateTime value)
           at WriteSchedulerSettingsToJson(XmlWriterDelegator , Object , XmlObjectSerializerWriteContextComplexJson , Clas
       sDataContract , XmlDictionaryString[] )
           at System.Runtime.Serialization.Json.JsonClassDataContract.WriteJsonValueCore(XmlWriterDelegator jsonWriter, Ob
       ject obj, XmlObjectSerializerWriteContextComplexJson context, RuntimeTypeHandle declaredTypeHandle)
           at System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.WriteDataContractValue(DataCont
       ract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
           at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContra
       ct, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
           at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObjectContent(XmlWriterDelegator w
       riter, Object graph)
           at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObject(XmlWriterDelegator writer,
       Object graph)
           at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Obje
       ct graph, DataContractResolver dataContractResolver)
           at System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(XmlDictionaryWriter writer, Object
       graph)
       at System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(Stream stream, Object graph)
       at Microsoft.IdentityManagement.PowerShell.ObjectModel.SchedulerSettings.Serialize()
           at SchedulerUtils.GetCurrentSchedulerSettings(_ConfigAttrNode* pcanList, UInt32 ccanItems, Char** syncSettingsS
       erialized, Char** errorString),Microsoft.IdentityManagement.PowerShell.Cmdlet.GetADSyncScheduler

    The O365 Portal Reports that the last Sync is not updating anymore.

    Any Ideas?

    Regards

    Andres Bohren


    MCSE 2003 / MCSA 2003 Messaging / MCTS: Windows Server 2008 / MCTS: Windows Vista, SQL 2005 / MCTS: Microsoft System Center Operations Manager 2007 / MCITP: Enterprise Administrator / MCITP: Enterprise Messaging Administrator 2007 / 2010 / VCP - VMWare Certified Professional

    Tuesday, February 23, 2016 8:59 PM

Answers

  • Andres,

    I had the same issue and solved it by updating to the latest version (1.1.110.0) 

    Regards Guido Lemmerling

    • Marked as answer by Andres Bohren Sunday, February 28, 2016 7:34 AM
    Saturday, February 27, 2016 1:22 PM

All replies

  • Hi Andres, you should post this on the Azure AD forums: https://social.msdn.microsoft.com/forums/azure/en-US/home?forum=WindowsAzureAD

    Seems like exception in the code, which probably needs to be addressed by the devs.

    Wednesday, February 24, 2016 8:16 AM
  • Hi everybody,

    Might be a Problem that is known

    http://benpowell.soup.io/post/156011793/WCF-JSON-Serialization-error-with-DateTime-MinVal

    The Problem occurs on a Windows Server 2012

    PS C:\> Get-WinSystemLocale
    LCID             Name             DisplayName
    ----             ----             -----------
    2055             de-CH            German (Switzerland)

    PS C:\> Get-Culture
    LCID             Name             DisplayName
    ----             ----             -----------
    2055             de-CH            German (Switzerland)

    PS C:\> [System.TimeZone]::CurrentTimeZone

    StandardName                                                DaylightName
    ------------                                                ------------
    W. Europe Standard Time                                     W. Europe Daylight Time

    Have installed the Microsoft .NET Framework 4.6.1, but this did not help.

    Regards

    Andres Bohren


    MCSE 2003 / MCSA 2003 Messaging / MCTS: Windows Server 2008 / MCTS: Windows Vista, SQL 2005 / MCTS: Microsoft System Center Operations Manager 2007 / MCITP: Enterprise Administrator / MCITP: Enterprise Messaging Administrator 2007 / 2010 / VCP - VMWare Certified Professional

    Wednesday, February 24, 2016 8:32 AM
  • Hi everybody,
    I have exactly the same problem on a Windows Server 2012 R2 with german locale.
    Coincidence ? I don't think so....

    regards

    Fabian

    Begin of Stacktrace:

    Get-ADSyncScheduler
    Get-ADSyncScheduler : System.Runtime.Serialization.SerializationException:
    DateTime values that are greater than DateTime.MaxValue or smaller than
    DateTime.MinValue when converted to UTC cannot be serialized to JSON. --->
    System.ArgumentOutOfRangeException: Specified argument was out of the range of
    valid values.
    Parameter name: value



    • Edited by DevFabian Wednesday, February 24, 2016 3:17 PM
    Wednesday, February 24, 2016 3:14 PM
  • Andres,

    I had the same issue and solved it by updating to the latest version (1.1.110.0) 

    Regards Guido Lemmerling

    • Marked as answer by Andres Bohren Sunday, February 28, 2016 7:34 AM
    Saturday, February 27, 2016 1:22 PM
  • I confirm, with the Version 1.1.110 the Problem is solved. Get-ADSyncScheduler don't trow any Errors and Sync is working againn.

    Regards Andres Bohren


    MCSE 2003 / MCSA 2003 Messaging / MCTS: Windows Server 2008 / MCTS: Windows Vista, SQL 2005 / MCTS: Microsoft System Center Operations Manager 2007 / MCITP: Enterprise Administrator / MCITP: Enterprise Messaging Administrator 2007 / 2010 / VCP - VMWare Certified Professional

    Sunday, February 28, 2016 7:36 AM