Quantcast
Channel: Forum Microsoft Identity Manager
Viewing all articles
Browse latest Browse all 6944

Run two full sync after each other

$
0
0

Hello!

I only use the Synchronization Service and no Portal.
In this example I have two agents HR and Phone. The two HR and Phone are just simple databases

I run these profiles
Full Import for agent HR so the CS contains the Data
Full Sync HR which call the provision which create Phone object that links to MV object

Now when I run Full Sync HR a second time I can see that the provision is create the Phone connector again which
I find strange. So my question is why is not this variable targetAgent.Connectors.Count equal to 1 telling me that you already have a connector

//Here is the code that provision Phone
void ProvisionPhone(MVEntry mventry)
        {
            CSEntry csentryKatalog;
            ReferenceValue dn;
            int connectorsSourceSystem = mventry.ConnectedMAs["Projekt - Personal"].Connectors.Count;
            if (connectorsSourceSystem == 0)
            {
                connectorsSourceSystem = mventry.ConnectedMAs["Projekt - AD"].Connectors.Count;
            }
            ConnectedMA targetAgent = mventry.ConnectedMAs["Projekt - Phone"];
            
            if (connectorsSourceSystem >= 1 && targetAgent.Connectors.Count == 0)
            {
                dn = targetAgent.CreateDN(mventry["personnummer"].Value);
                csentryKatalog = targetAgent.Connectors.StartNewConnector("Katalog");
                csentryKatalog.DN = dn;
                csentryKatalog["MAID"].Value = mventry["personnummer"].Value;
                csentryKatalog.CommitNewConnector();
            }

//Tony


Viewing all articles
Browse latest Browse all 6944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>