none
How can you call MapAttributesForExport and read from csentry RRS feed

Answers

  • Hi,

    the docu behind the link you provided does not state that csentry is readonly. It it by the way an example for newly provisioned objects.

    The sequence you provided is correct.

    The csentry["ACL"] is present and therefore readable in the following two situations.

    1. It is a connector and a value is provided by the datasource (Staged from CD to CS)
    2. You provisioned a new object with that attribute. (which means it is a connector now, that can be exported)

    Just test my example on an Connector an you will see that it works. I've tested it in my lab to ensure the code is correct.

    If you never reach the " //I will never come here" section of your code, this simple means that the attribute not present in your CS.

    /Peter 


    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    • Marked as answer by TojoTojo Thursday, August 30, 2018 5:59 PM
    Thursday, August 30, 2018 4:50 PM

All replies

  • Hi,

    Since the identity is in an connected state MV object connected to CS object both objects are passed to the method as you can see by the method call.

    So you have the MV object present (but it is read only in that method) and also the CS objects.

    In your example it seems to me that some attributes should only flow if the objecttype is "employee".

    In addtion sometime you want to check if there is already a value on an CS objects attribute before writing to CS

    Depends on your needs.

    /Peter


    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    Monday, August 27, 2018 11:38 AM
  • Skip

    • Edited by TojoTojo Tuesday, September 25, 2018 1:01 PM
    Monday, August 27, 2018 12:11 PM
  • Hi

    you should be able to read it as it represents the current connector space object, like in the following official example: https://msdn.microsoft.com/de-de/library/windows/desktop/ms696026(v=vs.85).aspx

    mventry is read-only in that method but csentry is read/write.

    What error do you get ?


    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    Monday, August 27, 2018 2:54 PM
  • Skip
    • Edited by TojoTojo Tuesday, September 25, 2018 1:01 PM
    Tuesday, August 28, 2018 8:34 AM
  • Hi,

    I "disagree".

    CS values can either be set when you create a new connect, or updated by an import of an Connector/MA.

    In both cases you can read the CS value.

    The provided example above is an example of that, the csentry could be a value changed in AD manually and imported to the CS. The code will calculate the correct value and set it back to what is should be.

    /Peter


    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    Tuesday, August 28, 2018 6:04 PM
  • skip

    • Edited by TojoTojo Tuesday, September 25, 2018 1:03 PM
    Wednesday, August 29, 2018 2:05 PM
  • Hi,

    I just checked it in my demolab and do a small sample which should reset a attribute in AD which I DON'T set in provision code.

    Sample is like this:

    - When company attribute in AD is set to "Test" it will changed to "Demo"
    - If company attribute in AD is empty it will be set to "Stapf Inc."

    Advanced attribute flow definition in MA is:

    Export flow from MV person attribute <objectId> to CS user attribute "company"

    I used <objectId> in that case because I need an attribute in MV that is filled otherwise code is not triggerd.
    (Is that maybe your issues that the code gets not triggerd ? or do you get an error that read is not allowed ?)

    So here is my simple example:

        Public Sub MapAttributesForExport(ByVal FlowRuleName As String, ByVal mventry As MVEntry, ByVal csentry As CSEntry) Implements IMASynchronization.MapAttributesForExport
            Select Case FlowRuleName.ToString()
                Case "company"
                    Dim myValue As String = ""
                    If csentry("company").IsPresent Then
                        myValue = csentry("company").StringValue
                    End If
    
                    If myValue.Equals("Test") Then
                        csentry("company").StringValue = "Demo"
                    Else
                        csentry("company").StringValue = "Stapf Inc."
                    End If
            End Select
        End Sub
    

    It works like charm so read csentry IS possible at this time.

    /Peter


    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    Thursday, August 30, 2018 7:37 AM
  • Skip

    • Edited by TojoTojo Tuesday, September 25, 2018 1:02 PM
    Thursday, August 30, 2018 9:43 AM
  • Hi

    the sample was just the prove that CSEntry is READABLE at every time.

    csentry["ACL"] can only be true if there is a value which you read from the connected data source of course, so it must be in the attribute list which you read from the source.

    It is "csentry", right? so this is kind of cached/imported version of the "real" objects which exists in the data sourse.

    It might be helpful to know what you are trying to archive, so we can bring you on the correct way.

    /Peter


    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    Thursday, August 30, 2018 10:41 AM
  • Skip

    • Edited by TojoTojo Tuesday, September 25, 2018 1:03 PM
    Thursday, August 30, 2018 11:41 AM
  • Skip

    • Edited by TojoTojo Tuesday, September 25, 2018 1:03 PM
    Thursday, August 30, 2018 3:28 PM
  • Hi,

    the docu behind the link you provided does not state that csentry is readonly. It it by the way an example for newly provisioned objects.

    The sequence you provided is correct.

    The csentry["ACL"] is present and therefore readable in the following two situations.

    1. It is a connector and a value is provided by the datasource (Staged from CD to CS)
    2. You provisioned a new object with that attribute. (which means it is a connector now, that can be exported)

    Just test my example on an Connector an you will see that it works. I've tested it in my lab to ensure the code is correct.

    If you never reach the " //I will never come here" section of your code, this simple means that the attribute not present in your CS.

    /Peter 


    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    • Marked as answer by TojoTojo Thursday, August 30, 2018 5:59 PM
    Thursday, August 30, 2018 4:50 PM
  • Skip

    • Edited by TojoTojo Tuesday, September 25, 2018 1:04 PM
    Thursday, August 30, 2018 5:04 PM
  • Hi,

    Since this is an MapAttributeforExport it is outbound of course, in that special case I tested on an AD Connector, but that sample is valid for every connector that has a "company" attribute and where you can edit the company attribute in the connected system.

    It the sample I have some users in AD and MV and they are connected, the AD some users have the company attribute set to "Test". The above flow will change those to "Demo" or if company is not set in AD it is set to "Stapf Inc". Its just a stupid sample to show how it works.

    You could try it with an SQL MA doesn't matter, or even a Text File MA, just have an MV object that is connected to the CS object.

    By the way every MA can be inbound, outbound or both.



    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    Thursday, August 30, 2018 5:58 PM
  • Skip

    • Edited by TojoTojo Tuesday, September 25, 2018 1:04 PM
    Thursday, August 30, 2018 6:00 PM
  • Skip

    • Edited by TojoTojo Tuesday, September 25, 2018 1:04 PM
    Friday, August 31, 2018 7:01 AM
  • Hi

    as I said before I don't agree (in general) it might be the case with your homedir agent because the attribute you want to read is not present in the CS.

    There is no technical restriction on an MA that says this one is target or source its an logical think depending on your flows and setting.

    It is readable in the 2 situations I mentioned in my answer before.

    There are only 2 restrictions in the following methods:

    MapAttributesForImport: CSEntry is read-only, MVEntry is read/write
    MapAttributesForExport: CSEntry is read/write, MVEntry is read-only

    /Peter


    Peter Stapf - ExpertCircle GmbH - My blog: JustIDM.wordpress.com

    Friday, August 31, 2018 7:19 AM