Unable to Retrieve userAccessControl Parameter After Upgrade

Mar 19, 2013 at 6:14 PM
Hi

After upgrading to the latest version of this tool, and that having successfully resolved my problem with retrieving the MSExchMasterAccountSid property, I now find that I am unable to retrieve the userAccountControl property.

In the old version that I was using the connection cast this to a string automatically, and I was then able to manipluate that string and use it in my SSIS solution. However, I now get an error message when attempting to retrieve the userAccessControl property:

Error: 0xC0047062 at Data Flow Task, Import From AD [4228]: System.ArgumentException: The "value" parameter must be a string or byte[] type.
Parameter name: valuesType
at System.DirectoryServices.Protocols.DirectoryAttribute.GetValues(Type valuesType)
at DirectoryServicesProtocolsExtensions.SearchResult.SearchResultParser.GetSingleValuedAttributeData(LdapAttributeMetaMap ldapToDotNetMetaMap, DirectoryAttribute attribute)
at DirectoryServicesProtocolsExtensions.SearchResult.SearchResultToDataTable.ToDataTable(SearchResultEntry searchResultEntry, LdapConnection ldapConnection, LdapMetaMapFactory ldapMetaMapFactory, DataTable resultDataTable)
at SsisLdapSource.SsisLdapSource.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] pipelineBuffers)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)

I have tried to change the output column to every different type in the list, but get the same error. I can only conclude that it is the data flow source that doesn't like the data type of this parameter in the AD store.

Has anyone been able to retrieve this property? Any suggestions would be gratefully received.

Thanks!
Coordinator
Mar 20, 2013 at 3:25 AM
Thanks for uncovering this.
I can reproduce the bug and working on a fix. Should have something by the end of this week.
Alex.
Coordinator
Mar 20, 2013 at 8:56 PM
1.4.0.4 release now available, which addresses this issue identified on this thread.
Since most of the time, we want to get userAccountControl as INT, I added a new configuration option (StringEncodedIntAttributes). By placing userAccountControl on that list ( it is there by default) the component will convert it to INT. If you would rather receive it as a string (this is how System.DirectoryServices.Protocols brings it over), remove the attribute from the list.
Thanks
Alex.