Hi folks,
The subject almost says it all.
I haven't needed to use the Utils library before, but looking at the following code sample, I cannot fathom why calling Utils.GetAttributeType results in the errors below (taken from Event Viewer via PowerShell) where Utils.FindMVEntries succeeds (when uncommented, of course).
The process I'm using to replicate the fault is:
- Search the connector space (in this case using an Active Directory MA) for the test account;
- Preview the Full Sync changes, which produces the error on a development MIM box.
In both cases (i.e. both MIM hosts), the environment is:
- Windows Server 2019 Standard, build 1809;
- MIM 2016 SP2 (4.6.34.0), sync service only (no portal).
Any ideas on what I'm missing?
Additional information
Referring to the following documentation, my understanding is that this should work in a rules extension (and certainly the FindMVEntries does).
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/forefront-2010/ff771997(v=vs.100)
Code sample that replicates the exception
void IMASynchronization.MapAttributesForImport( string FlowRuleName, CSEntry csentry, MVEntry mventry)
{
switch (FlowRuleName.ToLower())
{
case "cstaff.department":
Utils.GetAttributeType("department", out AttributeType attrType, out bool multivalued);
//MVEntry[] results = Utils.FindMVEntries("accountname", "e001");
break;
default:
break;
}
}Event Viewer errors (two of them) from the failed Utils.GetAttributeType call
TimeCreated : 31/08/2020 9:48:01 PM
ProviderName : FIMSynchronizationService
Id : 6300
Message : The server encountered an unexpected error:"0x8000ffff
at Microsoft.MetadirectoryServices.Impl.ScriptHost.ThrowExceptionFromHRESULT(Int32 hr)
at Microsoft.MetadirectoryServices.Impl.ScriptHost.GetAttributeType(String pattributeName, AttributeType& pType, Boolean&
pIsMultivalued)
at Mms_ManagementAgent_robertsonpayne_com.MAExtensionObject.Microsoft.MetadirectoryServices.IMASynchronization.MapAttributesForImpo
rt(String FlowRuleName, CSEntry csentry, MVEntry mventry)
at Microsoft.MetadirectoryServices.Impl.ScriptHost.InvokeMA_FlowCSToMV(_OCTET octCSPreImage, _OCTET octCSDelta, _OCTET
octMVPreImage, _OCTET octMVDelta, UInt32 nMappings, _AttributeFlowMapping* rgMappings, _OCTET* poctMVChanges, _MappingResults*
pMappingResults, Int32* pOverallResult)
InnerException=>
none"
TimeCreated : 31/08/2020 9:48:01 PM
ProviderName : FIMSynchronizationService
Id : 6312
Message : The server encountered an unexpected error while performing an operation for a rules extension.
"BAIL: MMS(4396): x:\bt\1022822\repo\src\dev\scrhost\scripthost\CImageServices.h(386): 0x80230303 (The image or delta doesn't have
an attribute with that name.)
BAIL: MMS(4396): X:\bt\1022822\repo\src\dev\scrhost\ScriptHost\ScriptHost.cpp(1078): 0x8000ffff (Catastrophic failure)
From script host:
Microsoft.MetadirectoryServices.Impl.InternalError: 0x8000ffffForefront Identity Manager 4.6.34.0"