Powershell connector and ForceSyncOf parameter.

I have implemented Powershell connector for the target system and I need an extended set of account attributes, not just altered ones, to call the Update method. In the ForceSyncOf parameter I have specified list of all necessary attributes but the connector used only changed ones. Is there may be an error or PS-connectors use its own logic and ignore ForceSyncOf?

  • Hello, Niels.

    For testing purposes I have implemented simple PS-connector to Json-file, synchronization project and AdHoc-provisioniing process with convenient logging ) I would appreciate some further comments.

    https://github.com/syozh/1im-xyz

    Many thanks,
    Aleksandr

  • Hello Aleksandr,

    Nicely done! If tried it out on a 8.1.4 OOTB Installation and it works like a charm.

    Log: Update on Bob with generating condition (Value = True) instead of (Value = CBool(values("NeedExecute"))

    2021-06-05 19:30:03.9714 INFO (XyzProvisionLog ) : >> Process CCC_Xyz_Account_Provision: Event: UPDATE 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) : Connection variables: 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   GenProcID: 85dadf78-a15c-4ab8-b04c-cc11d82f50b3 
    2021-06-05 19:30:03.9714 DEBUG (XyzProvisionLog ) : Entity: Xyz/Bob Brown (Xyz) 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   AccountDisabled: False 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   AccountExpires: 12/30/1899 12:00:00 AM 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   AccountName: Bob 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   CanonicalName: Xyz/Bob Brown 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   cn: Bob Brown 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   Description: Vice-president 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   DisplayName: Xyz/Bob Brown (Xyz) 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   DistinguishedName: user=Bob Brown,system=Xyz 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   FirstName: Bob 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   IdentityType:  
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   IsGroupAccount: False 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   IsPrivilegedAccount: False 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   LastLogon: 12/30/1899 12:00:00 AM 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   LastName: Brown 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   MatchPatternForMembership: 0 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   MemberOf:  
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   ObjectGUID: c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   Password: *** 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   PWDLastSet: 12/30/1899 12:00:00 AM 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   RiskIndexCalculated: 0.05 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   UID_Person:  
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   UID_TSBAccountDef:  
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   UID_TSBBehavior:  
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   UID_UNSAccountB: cc891d09-7433-4378-9873-a521329952e5 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   UID_UNSContainerB:  
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   UID_UNSRootB: 35dc1a72-ed10-421e-bca6-fa730d6fc43a 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   XDateInserted: 6/5/2021 6:45:14 AM 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   XDateUpdated: 6/5/2021 5:26:56 PM 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   XMarkedForDeletion: 0 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   XObjectKey: <Key><T>UNSAccountB</T><P>cc891d09-7433-4378-9873-a521329952e5</P></Key> 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   XTouched:  
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   XUserInserted: Synchronization 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   XUserUpdated: viadmin 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) : ObjectKey: <Key><T>UNSAccountB</T><P>cc891d09-7433-4378-9873-a521329952e5</P></Key> 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) : AdHocData: 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   ConnectionUID: CCC-6FF2F8A2B54AEE4EA03CF45BA9C9B198 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   VariableSetUID: CCC-A10985E7CE665640A5593A20AEA412C7 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   ExecutionServerUID: B3A90D04-819D-4082-9B30-5F880C1CDE29 
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   ExecutionServerTag:  
    2021-06-05 19:30:03.9714 TRACE (XyzProvisionLog ) :   ProjectionConfigUID: CCC-0962E299E0F2234AAC91F1D5FADEBEC4 
    2021-06-05 19:30:03.9714 INFO (XyzProvisionLog ) : NeedExecute: False 
    2021-06-05 19:30:18.7691 INFO (XyzConnectorLog ) : Connect-Xyz file=C:/1im-xyz-main/Xyz.json 
    2021-06-05 19:30:19.0944 INFO (XyzConnectorLog ) : Get-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 19:30:19.0944 DEBUG (XyzConnectorLog ) :   > {"fname":"Bob","title":"Vice-president","disabled":"0","id":"c8932aad-4b86-469d-bd8f-2bf715c94448","lname":"Brown"} 
    2021-06-05 19:30:19.3184 INFO (XyzConnectorLog ) : Get-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 19:30:19.3184 DEBUG (XyzConnectorLog ) :   > {"fname":"Bob","title":"Vice-president","disabled":"0","id":"c8932aad-4b86-469d-bd8f-2bf715c94448","lname":"Brown"} 
    2021-06-05 19:30:19.3894 INFO (XyzConnectorLog ) : Disconnect-Xyz 
    

    Log: Update on Bob changed title from Vice-president to President

    2021-06-05 19:40:55.7070 INFO (XyzProvisionLog ) : >> Process CCC_Xyz_Account_Provision: Event: UPDATE 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) : Connection variables: 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   GenProcID: 93eca0f5-0d18-4522-8927-8bea1638fbe4 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   QBMProduct: Manager 
    2021-06-05 19:40:55.7070 DEBUG (XyzProvisionLog ) : Entity: Xyz/Bob Brown (Xyz) 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   AccountDisabled: False 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   AccountExpires: 12/30/1899 12:00:00 AM 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   AccountName: Bob 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   CanonicalName: Xyz/Bob Brown 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   cn: Bob Brown 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   Description: Vice-president -> President 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   DisplayName: Xyz/Bob Brown (Xyz) 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   DistinguishedName: user=Bob Brown,system=Xyz 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   FirstName: Bob 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   IdentityType:  
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   IsGroupAccount: False 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   IsPrivilegedAccount: False 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   LastLogon: 12/30/1899 12:00:00 AM 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   LastName: Brown 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   MatchPatternForMembership: 0 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   MemberOf:  
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   ObjectGUID: c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   Password: *** 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   PWDLastSet: 12/30/1899 12:00:00 AM 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   RiskIndexCalculated: 0.05 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   UID_Person:  
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   UID_TSBAccountDef:  
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   UID_TSBBehavior:  
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   UID_UNSAccountB: cc891d09-7433-4378-9873-a521329952e5 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   UID_UNSContainerB:  
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   UID_UNSRootB: 35dc1a72-ed10-421e-bca6-fa730d6fc43a 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   XDateInserted: 6/5/2021 6:45:14 AM 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   XDateUpdated: 6/5/2021 5:26:56 PM 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   XMarkedForDeletion: 0 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   XObjectKey: <Key><T>UNSAccountB</T><P>cc891d09-7433-4378-9873-a521329952e5</P></Key> 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   XTouched:  
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   XUserInserted: Synchronization 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   XUserUpdated: viadmin 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) : ObjectKey: <Key><T>UNSAccountB</T><P>cc891d09-7433-4378-9873-a521329952e5</P></Key> 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) : AdHocData: 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   ConnectionUID: CCC-6FF2F8A2B54AEE4EA03CF45BA9C9B198 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   VariableSetUID: CCC-A10985E7CE665640A5593A20AEA412C7 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   ExecutionServerUID: B3A90D04-819D-4082-9B30-5F880C1CDE29 
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   ExecutionServerTag:  
    2021-06-05 19:40:55.7070 TRACE (XyzProvisionLog ) :   ProjectionConfigUID: CCC-0962E299E0F2234AAC91F1D5FADEBEC4 
    2021-06-05 19:40:55.7070 INFO (XyzProvisionLog ) : NeedExecute: True 
    2021-06-05 19:41:19.6712 INFO (XyzConnectorLog ) : Connect-Xyz file=C:/1im-xyz-main/Xyz.json 
    2021-06-05 19:41:20.0192 INFO (XyzConnectorLog ) : Get-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 19:41:20.0372 DEBUG (XyzConnectorLog ) :   > {"fname":"Bob","title":"Vice-president","disabled":"0","id":"c8932aad-4b86-469d-bd8f-2bf715c94448","lname":"Brown"} 
    2021-06-05 19:41:20.2842 INFO (XyzConnectorLog ) : Set-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 fname= lname= title=President 
    2021-06-05 19:41:20.2842 DEBUG (XyzConnectorLog ) :   * parameters = {"id":"c8932aad-4b86-469d-bd8f-2bf715c94448","title":"President"} 
    2021-06-05 19:41:20.3152 INFO (XyzConnectorLog ) : Set-XyzAccount2 id=c8932aad-4b86-469d-bd8f-2bf715c94448 fname= lname= title= 
    2021-06-05 19:41:20.3152 DEBUG (XyzConnectorLog ) :   * parameters = {"id":"c8932aad-4b86-469d-bd8f-2bf715c94448"} 
    2021-06-05 19:41:20.3152 INFO (XyzConnectorLog ) : Get-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 19:41:20.3152 DEBUG (XyzConnectorLog ) :   > {"fname":"Bob","title":"President","disabled":"0","id":"c8932aad-4b86-469d-bd8f-2bf715c94448","lname":"Brown"} 
    2021-06-05 19:41:20.3642 INFO (XyzConnectorLog ) : Get-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 19:41:20.3642 DEBUG (XyzConnectorLog ) :   > {"fname":"Bob","title":"President","disabled":"0","id":"c8932aad-4b86-469d-bd8f-2bf715c94448","lname":"Brown"} 
    2021-06-05 19:41:20.4512 INFO (XyzConnectorLog ) : Disconnect-Xyz 
    

    Log: Update on Bob changed title from President back to Vice-President (now with the ForceSyncOff parameter disabled)

    2021-06-05 20:01:50.7028 INFO (XyzProvisionLog ) : >> Process CCC_Xyz_Account_Provision: Event: UPDATE 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) : Connection variables: 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   GenProcID: f35b201f-d84b-4a57-823a-33ee96fc2737 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   QBMProduct: Manager 
    2021-06-05 20:01:50.7028 DEBUG (XyzProvisionLog ) : Entity: Xyz/Bob Brown (Xyz) 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   AccountDisabled: False 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   AccountExpires: 12/30/1899 12:00:00 AM 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   AccountName: Bob 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   CanonicalName: Xyz/Bob Brown 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   cn: Bob Brown 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   Description: President -> Vice-president 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   DisplayName: Xyz/Bob Brown (Xyz) 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   DistinguishedName: user=Bob Brown,system=Xyz 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   FirstName: Bob 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   IdentityType:  
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   IsGroupAccount: False 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   IsPrivilegedAccount: False 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   LastLogon: 12/30/1899 12:00:00 AM 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   LastName: Brown 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   MatchPatternForMembership: 0 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   MemberOf:  
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   ObjectGUID: c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   Password: *** 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   PWDLastSet: 12/30/1899 12:00:00 AM 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   RiskIndexCalculated: 0.05 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   UID_Person:  
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   UID_TSBAccountDef:  
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   UID_TSBBehavior:  
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   UID_UNSAccountB: cc891d09-7433-4378-9873-a521329952e5 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   UID_UNSContainerB:  
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   UID_UNSRootB: 35dc1a72-ed10-421e-bca6-fa730d6fc43a 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   XDateInserted: 6/5/2021 6:45:14 AM 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   XDateUpdated: 6/5/2021 5:40:56 PM 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   XMarkedForDeletion: 0 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   XObjectKey: <Key><T>UNSAccountB</T><P>cc891d09-7433-4378-9873-a521329952e5</P></Key> 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   XTouched:  
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   XUserInserted: Synchronization 
    2021-06-05 20:01:50.7028 TRACE (XyzProvisionLog ) :   XUserUpdated: viadmin 
    2021-06-05 20:01:50.7495 TRACE (XyzProvisionLog ) : ObjectKey: <Key><T>UNSAccountB</T><P>cc891d09-7433-4378-9873-a521329952e5</P></Key> 
    2021-06-05 20:01:50.7495 TRACE (XyzProvisionLog ) : AdHocData: 
    2021-06-05 20:01:50.7495 TRACE (XyzProvisionLog ) :   ConnectionUID: CCC-6FF2F8A2B54AEE4EA03CF45BA9C9B198 
    2021-06-05 20:01:50.7495 TRACE (XyzProvisionLog ) :   VariableSetUID: CCC-A10985E7CE665640A5593A20AEA412C7 
    2021-06-05 20:01:50.7495 TRACE (XyzProvisionLog ) :   ExecutionServerUID: B3A90D04-819D-4082-9B30-5F880C1CDE29 
    2021-06-05 20:01:50.7495 TRACE (XyzProvisionLog ) :   ExecutionServerTag:  
    2021-06-05 20:01:50.7495 TRACE (XyzProvisionLog ) :   ProjectionConfigUID: CCC-0962E299E0F2234AAC91F1D5FADEBEC4 
    2021-06-05 20:01:50.9331 INFO (XyzProvisionLog ) : NeedExecute: True 
    2021-06-05 20:02:51.3780 INFO (XyzConnectorLog ) : Connect-Xyz file=C:/1im-xyz-main/Xyz.json 
    2021-06-05 20:02:51.6970 INFO (XyzConnectorLog ) : Get-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 20:02:51.7120 DEBUG (XyzConnectorLog ) :   > {"fname":"Bob","title":"President","disabled":"0","id":"c8932aad-4b86-469d-bd8f-2bf715c94448","lname":"Brown"} 
    2021-06-05 20:02:51.9210 INFO (XyzConnectorLog ) : Set-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 fname= lname= title=Vice-president 
    2021-06-05 20:02:51.9210 DEBUG (XyzConnectorLog ) :   * parameters = {"id":"c8932aad-4b86-469d-bd8f-2bf715c94448","title":"Vice-president"} 
    2021-06-05 20:02:51.9570 INFO (XyzConnectorLog ) : Set-XyzAccount2 id=c8932aad-4b86-469d-bd8f-2bf715c94448 fname= lname= title= 
    2021-06-05 20:02:51.9570 DEBUG (XyzConnectorLog ) :   * parameters = {"id":"c8932aad-4b86-469d-bd8f-2bf715c94448"} 
    2021-06-05 20:02:51.9570 INFO (XyzConnectorLog ) : Get-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 20:02:51.9570 DEBUG (XyzConnectorLog ) :   > {"fname":"Bob","title":"Vice-president","disabled":"0","id":"c8932aad-4b86-469d-bd8f-2bf715c94448","lname":"Brown"} 
    2021-06-05 20:02:52.0040 INFO (XyzConnectorLog ) : Get-XyzAccount id=c8932aad-4b86-469d-bd8f-2bf715c94448 
    2021-06-05 20:02:52.0040 DEBUG (XyzConnectorLog ) :   > {"fname":"Bob","title":"Vice-president","disabled":"0","id":"c8932aad-4b86-469d-bd8f-2bf715c94448","lname":"Brown"} 
    2021-06-05 20:02:52.0777 INFO (XyzConnectorLog ) : Disconnect-Xyz 
    

  • Niels,
    thanks for testing my example,
    and if we return to the question of passing attributes, we can see that the arguments of "lname" and "fname" of Set-XyzAccount were not passed (lines 50-51 of log 2 and 3). Here, this is not a problem, but in a real case (the system is a DBMS but I cannot use the native DB-connector) to update the account data I must call a stored procedure into which I must pass on values of all account attributes. Does the PS-connector pass only the changed attributes to the command under ANY CONDITIONS and must I read the objects from the system EVERY TIME before changing it? And why the "title" parameter did not passed when calling Set-XyzAccount2 after Set-XyzAccount (lines 52-53)?

  • I've think we run into a bug, issue in a nutshell:

    Powershell connector: Mandatory properties are not passed to powershell cmdlet/function when updating.

    Config for mandatory property:
    - Custom process contains parameter ForceSyncOf (Value = "LastName,FirstName,Description")
    - Powershell Conn, Definition - Class User:  <Property Name="LastName" DataType="String" IsMandatory="true">

    Issue the mandatory properties are 
    treated the same as non-mandatory properties. Thus when the sync-engine receives an update:
    it first runs a "Get-User", compares the returned properties to the EntityPatch from the AdHocProjection proces.
    and than sets the parameters on the powershell cmdlet/function only for changed properties.

    I've found a 'dirty' work-around when  you use IsMandatory="true" in combination with IsUniqueKey="true" the property is treated as Mandatory. Beats me?

    I've think it's time to call support.

  • I've made a service request and will keep you updated.

  • Thank you Niels! I will wait for the good news )

  • Here is the update...

    Service request:
    Posh connector: Mandatory properties are not passed to powershell cmdlet/function when updating

    Description
    Issue in Powershell connector: mandatory properties are treated the same as non-mandatory properties when updating.

    Example config for mandatory property:
    - Custom process contains parameter:
    ForceSyncOf (Value = LastName,FirstName,Description")
    - Powershell Conn: Definition file: Class User:
    <Property Name="LastName" DataType="String" IsMandatory="true">

    I've found a work-around when you use IsMandatory="true" in combination with IsUniqueKey="true" the property is treated as Mandatory

    Final response from support:
    After some more analysis product defect #34520 has been requalified as a feature and tracked by Enhancement Request ER #34520 now.

    It appears that the use of "ForceSyncOf" does not guarantee the transfer of those fields into the target system - it only guarantees that those properties will be mapped during provisioning (this JobParamter should have been called "ForceMappingOf" which better maps its purpose).

    The sync engine transfers always ONLY the changed properties. All other connectors will also have to load the object the second time to get some properties that are necessary for the operation. Hence, we will think about the new feature to somehow mark the properties as mandatory for a command. But if decided to implement, it will be implemented only in the future release of the product. Until then, an object will have to be loaded again (in a wrapper command that loads mandatory properties from the target system and uses them in the actual cmdlet-call).

  • Niels, thank you for clarifying this question!
    It's always interesting when defect transforms to feature )
    Now I use readings from the target systems before updates. But (without taking into account unnecessary operations) here we have possible collisions. For example, when attributes have not been updated in the target system (due to some logic error) and after corrections in OneIM, the connector will not use values from previous  update, but will get old ones from the target system. I.e.

    1) Update
       OneIM                  TS
       -----                  --
       A->A'                  A
       B->B'                  B
       WriteToTs(varA=A',varB=B'): error

    2) Correction
       OneIM                  TS
       -----                  --
       A'                     A
       B'->B"                 B
       varA=ReadAFromTs()=A
       WriteToTs(varA=A,varB=B")

    3) Result
       OneIM                  TS
       -----                  --
       A'                     A
       B"                     B"


  • Is there a fix for this issue?

    Is there any workaround?

    /Henrik