function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Eric DeskinEric Deskin 

Identity Connect MS-SQL

Does anyone have a solution for the following issue?

I've setup Identity Connect 2.1.0 on with MS-SQL as a back end but I'm not able to get the managerID field to populate using the default transformation rule:

ManagerID to Manager
(function () {
  try {

    if (!source || !source.length) {
      return null;
    }

    var
      orgId = "00DA0000000gukE", 
      link, 
      qry = openidm.query("system/AD/account", { 
          "query": { 
            "Equals": { 
              "field": "distinguishedName", 
              "values": [ source ] 
            } 
          }
        });

    if (!qry.result || qry.result.length !== 1) {
      return null;  
    }

    link = openidm.query("repo/link", { 
      "_queryId": "links-for-firstId",
      "linkType": "ADUsers_SalesForceUsers_" + orgId,
      "firstId": encodeURIComponent(qry.result[0].objectGUID)
    });

    if (!link.result || link.result.length !== 1) {
      return null;
    } else {
      return link.result[0].secondId;
    }

  } catch ( e ) {
    return null;
  }

}());


This rule works fine if I use OrientDB as the back end, but doesn't work when I use MS-SQL as the back end. Perhaps an issue with OpenIDM?
chrinderPWWchrinderPWW
Have you been able to solve this?
Eric DeskinEric Deskin
Yes I solved this issue. The problem is that that the person's manager must be synced to Salesforce as well. ManagerID will only populate if the parent of the object you're syncing is also in Salesforce. If Tom is the manager of Rob, and I sync Rob to Salesforce without syncing Tom, the manager ID field will be blank. If I sync Tom first, then sync Rob, the managerID will be populated. This isn't an issue with MS-SQL or MYSQL since I've done both implementations, but rather how ManagerID's are created in SF via OpenIDM.
chrinderPWWchrinderPWW
Thanks Eric D.  I was aware of needing to sync manager first.  However, we are still having an issue. I'm still trying to get to the bottom of it.  It seems that Syncing of the manager stopped after our last update.
Eric DeskinEric Deskin

I am running

IC Release Ver: 2.1.0
Build Revision 6996c45
IDM Version 2.1.0-IC-2.0.0

If you're having problems syncing just the manager, I'd check the Mappings and remove the Manager field and readd it. It should be (if you haven't changed anything) what I pasted above. That works for AD if that's your LDAP environment. I can't really think of another explaination if it's syncing other attributes, but not Manager, unless you have some repository sync issues on the domain controller you're pointed at.


 

chrinderPWWchrinderPWW
Thanks Eric D.  Appreciate the tips.