Modify users with REST driver

I am trying to understand how to use the REST driver functionalities. Have a case where I want to update current users in IDM with data from an API ednpoint. To do that I setup the Publish channel to recieve data from the API. 

I can recive the data from the API but the problem is that I´m not able to update users. This is more like a test for me to understand how to work with the driver. I tried to customize the contract from API as much as possible (so that I can use most of the standard behaviors of the driver) so it´s just hardcoded data which tries to update a telephonenumber. 

The problem I run in to is this:

This is the input:

This is the JSON data the gets recived from the API:

 

Any ideas how to push me in the right direction here?

Parents Reply Children
  • 0   in reply to   
    Yes, this is the output the shim produces in publisher poll mode.

    Make sense, though it would be nice to have the documentation updated (hint). Or at least, if it actually is in the documentation, make the search engine find it. 

  • 0 in reply to   

    [09/16/24 20:38:11.593]:Rest Driver PT:Rest Driver: poll
    [09/16/24 20:38:11.593]:Rest Driver PT:Rest Driver: Custom: preparing GET to http://DOMAIN/TelephonesAPI/api/Telephone
    [09/16/24 20:38:11.593]:Rest Driver PT:Rest Driver: Setting the following HTTP request properties:
     Authorization: <content suppressed>
    [09/16/24 20:38:11.594]:Rest Driver PT:Rest Driver: Annonymous login
    [09/16/24 20:38:11.594]:Rest Driver PT:Rest Driver: Did a HTTP GET with 0 bytes of data to http://DOMAIN/TelephonesAPI/api/Telephone
    [09/16/24 20:38:11.598]:Rest Driver PT:Rest Driver: Response code and message: 200 OK
    [09/16/24 20:38:11.598]:Rest Driver PT:Receiving DOM document from application.
    [09/16/24 20:38:11.599]:Rest Driver PT:
    <nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <driver-operation-data class-name="Telephone" command="poll" event-id="Rest Driver##124816203811##0">
          <response>
            <value>{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"
    User","id":"27"}]}</value>
          </response>
        </driver-operation-data>
      </input>
    </nds>
    [09/16/24 20:38:11.600]:Rest Driver PT:Applying input transformation policies.
    [09/16/24 20:38:11.601]:Rest Driver PT:Applying policy: %+C%14CNETQRESTJSON-itp-CheckRetries%-C.
    [09/16/24 20:38:11.601]:Rest Driver PT:  Applying to driver-operation-data #1.
    [09/16/24 20:38:11.601]:Rest Driver PT:    Evaluating selection criteria for rule 'set retry on status if sought'.
    [09/16/24 20:38:11.601]:Rest Driver PT:      (if-operation equal "status") = FALSE.
    [09/16/24 20:38:11.601]:Rest Driver PT:    Rule rejected.
    [09/16/24 20:38:11.602]:Rest Driver PT:Policy returned:
    [09/16/24 20:38:11.602]:Rest Driver PT:
    <nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <driver-operation-data class-name="Telephone" command="poll" event-id="Rest Driver##124816203811##0">
          <response>
            <value>{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}</value>
          </response>
        </driver-operation-data>
      </input>
    </nds>
    [09/16/24 20:38:11.606]:Rest Driver PT:Applying policy: %+C%14CNETQRESTJSON-itp-ConvertJSON%-C.
    [09/16/24 20:38:11.606]:Rest Driver PT:  Applying to driver-operation-data #1.
    [09/16/24 20:38:11.606]:Rest Driver PT:    Evaluating selection criteria for rule 'Translate JSON to XDS'.
    [09/16/24 20:38:11.606]:Rest Driver PT:      (if-xpath true "string-length(./response/value/text())>0") = TRUE.
    [09/16/24 20:38:11.606]:Rest Driver PT:    Rule selected.
    [09/16/24 20:38:11.606]:Rest Driver PT:    Applying rule 'Translate JSON to XDS'.
    [09/16/24 20:38:11.606]:Rest Driver PT:      Action: do-set-local-variable("jsonString",scope="policy",token-xpath("./response/value/text()")).
    [09/16/24 20:38:11.607]:Rest Driver PT:        arg-string(token-xpath("./response/value/text()"))
    [09/16/24 20:38:11.607]:Rest Driver PT:          token-xpath("./response/value/text()")
    [09/16/24 20:38:11.607]:Rest Driver PT:            Token Value: "{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}".
    [09/16/24 20:38:11.607]:Rest Driver PT:          Arg Value: "{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}".
    [09/16/24 20:38:11.607]:Rest Driver PT:      Action: do-set-local-variable("jsonString",scope="policy",token-replace-all("(\&)","&","$jsonString$")).
    [09/16/24 20:38:11.607]:Rest Driver PT:        arg-string(token-replace-all("(\&)","&","$jsonString$"))
    [09/16/24 20:38:11.607]:Rest Driver PT:          token-replace-all("(\&)","&","$jsonString$")
    [09/16/24 20:38:11.607]:Rest Driver PT:            token-replace-all("(\&)","&","$jsonString$")
    [09/16/24 20:38:11.607]:Rest Driver PT:              token-text("$jsonString$")
    [09/16/24 20:38:11.607]:Rest Driver PT:                Expanded variable reference '$jsonString$' to '{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}'.
    [09/16/24 20:38:11.607]:Rest Driver PT:              Arg Value: "{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}".
    [09/16/24 20:38:11.608]:Rest Driver PT:            Token Value: "{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}".
    [09/16/24 20:38:11.608]:Rest Driver PT:          Arg Value: "{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}".
    [09/16/24 20:38:11.608]:Rest Driver PT:      Action: do-set-local-variable("lvXML",scope="policy",arg-node-set(token-xml-parse(token-xpath("es:json2xml($jsonString)")))).
    [09/16/24 20:38:11.608]:Rest Driver PT:        arg-node-set(token-xml-parse(token-xpath("es:json2xml($jsonString)")))
    [09/16/24 20:38:11.608]:Rest Driver PT:          token-xml-parse(token-xpath("es:json2xml($jsonString)"))
    [09/16/24 20:38:11.608]:Rest Driver PT:            token-xml-parse(token-xpath("es:json2xml($jsonString)"))
    [09/16/24 20:38:11.608]:Rest Driver PT:              token-xpath("es:json2xml($jsonString)")
    [09/16/24 20:38:11.608]:Rest Driver PT:                Token Value: "<root>
    <users><telephoneNumber>0701231211</telephoneNumber><className>User</className><id>14</id></users><users><telephoneNumber>0701231211</telephoneNumber><className>User</className><id>6</id></users><users><telephoneNumber>0701231212</telephoneNumber><className>User</className><id>27</id></users>
    </root>".
    [09/16/24 20:38:11.609]:Rest Driver PT:              Arg Value: "<root>
    <users><telephoneNumber>0701231211</telephoneNumber><className>User</className><id>14</id></users><users><telephoneNumber>0701231211</telephoneNumber><className>User</className><id>6</id></users><users><telephoneNumber>0701231212</telephoneNumber><className>User</className><id>27</id></users>
    </root>".
    [09/16/24 20:38:11.609]:Rest Driver PT:          Token Value: {/}.
    [09/16/24 20:38:11.609]:Rest Driver PT:          Arg Value: {/}.
    [09/16/24 20:38:11.609]:Rest Driver PT:      Action: do-for-each(arg-node-set(token-xpath("$lvXML//users"))).
    [09/16/24 20:38:11.609]:Rest Driver PT:        arg-node-set(token-xpath("$lvXML//users"))
    [09/16/24 20:38:11.609]:Rest Driver PT:          token-xpath("$lvXML//users")
    [09/16/24 20:38:11.609]:Rest Driver PT:          Token Value: {<users>,<users>,<users>}.
    [09/16/24 20:38:11.609]:Rest Driver PT:          Arg Value: {<users>,<users>,<users>}.
    [09/16/24 20:38:11.609]:Rest Driver PT:        Performing actions for local-variable(current-node) = <users>.
    [09/16/24 20:38:11.609]:Rest Driver PT:          Action: do-append-xml-element("instance","..").
    [09/16/24 20:38:11.609]:Rest Driver PT:          Action: do-set-xml-attr("src-dn","../instance[last()]",token-xpath("$current-node/id/text()")).
    [09/16/24 20:38:11.609]:Rest Driver PT:            arg-string(token-xpath("$current-node/id/text()"))
    [09/16/24 20:38:11.610]:Rest Driver PT:              token-xpath("$current-node/id/text()")
    [09/16/24 20:38:11.610]:Rest Driver PT:                Token Value: "14".
    [09/16/24 20:38:11.610]:Rest Driver PT:              Arg Value: "14".
    [09/16/24 20:38:11.610]:Rest Driver PT:          Action: do-set-xml-attr("class-name","../instance[last()]","Telephone").
    [09/16/24 20:38:11.610]:Rest Driver PT:            arg-string("Telephone")
    [09/16/24 20:38:11.610]:Rest Driver PT:              token-text("Telephone")
    [09/16/24 20:38:11.610]:Rest Driver PT:              Arg Value: "Telephone".
    [09/16/24 20:38:11.610]:Rest Driver PT:          Action: do-set-xml-attr("class-name","../instance[last()]","Telephone").
    [09/16/24 20:38:11.610]:Rest Driver PT:            arg-string("Telephone")
    [09/16/24 20:38:11.610]:Rest Driver PT:              token-text("Telephone")
    [09/16/24 20:38:11.610]:Rest Driver PT:              Arg Value: "Telephone".
    [09/16/24 20:38:11.610]:Rest Driver PT:          Action: do-for-each(arg-node-set(token-xpath("$current-node/*"))).
    [09/16/24 20:38:11.610]:Rest Driver PT:            arg-node-set(token-xpath("$current-node/*"))
    [09/16/24 20:38:11.610]:Rest Driver PT:              token-xpath("$current-node/*")
    [09/16/24 20:38:11.610]:Rest Driver PT:              Token Value: {<telephoneNumber>,<className>,<id>}.
    [09/16/24 20:38:11.610]:Rest Driver PT:              Arg Value: {<telephoneNumber>,<className>,<id>}.
    [09/16/24 20:38:11.610]:Rest Driver PT:            Performing actions for local-variable(current-node) = <telephoneNumber>.
    [09/16/24 20:38:11.610]:Rest Driver PT:              Action: do-set-local-variable("lvAttrName",scope="policy",token-xpath("name($current-node)")).
    [09/16/24 20:38:11.610]:Rest Driver PT:                arg-string(token-xpath("name($current-node)"))
    [09/16/24 20:38:11.610]:Rest Driver PT:                  token-xpath("name($current-node)")
    [09/16/24 20:38:11.610]:Rest Driver PT:                    Token Value: "telephoneNumber".
    [09/16/24 20:38:11.611]:Rest Driver PT:                  Arg Value: "telephoneNumber".
    [09/16/24 20:38:11.611]:Rest Driver PT:              Action: do-set-local-variable("lvAttrValue",scope="policy","$current-node$").
    [09/16/24 20:38:11.611]:Rest Driver PT:                arg-string("$current-node$")
    [09/16/24 20:38:11.611]:Rest Driver PT:                  token-text("$current-node$")
    [09/16/24 20:38:11.611]:Rest Driver PT:                    Expanded variable reference '$current-node$' to '0701231211'.
    [09/16/24 20:38:11.611]:Rest Driver PT:                  Arg Value: "0701231211".
    [09/16/24 20:38:11.611]:Rest Driver PT:              Action: do-set-local-variable("lvAttr",scope="policy",arg-node-set(token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)")))).
    [09/16/24 20:38:11.611]:Rest Driver PT:                arg-node-set(token-").
    [09/16/24 15:08:55.287]:Rest Driver PT:                arg-string("$current-node$")
    [09/16/24 15:08:55.287]:Rest Driver PT:                  token-text("$current-node$")
    [09/16/24 15:08:55.287]:Rest Driver PT:                    Expanded variable reference '$current-node$' to 'User'.
    [09/16/24 15:08:55.287]:Rest Driver PT:                  Arg Value: "User".
    [09/16/24 15:08:55.287]:Rest Driver PT:              Action: do-set-local-variable("lvAttr",scope="policy",arg-node-set(token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)")))).
    [09/16/24 15:08:55.287]:Rest Driver PT:                arg-node-set(token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)")))
    [09/16/24 15:08:55.287]:Rest Driver PT:                  token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)"))
    [09/16/24 15:08:55.288]:Rest Driver PT:                    token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)"))
    [09/16/24 15:08:55.288]:Rest Driver PT:                      token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)")
    [09/16/24 15:08:55.288]:Rest Driver PT:                        Token Value: "<attr attr-name="className"><value>User</value></attr>".
    [09/16/24 15:08:55.288]:Rest Driver PT:                      Arg Value: "<attr attr-name="className"><value>User</value></attr>".
    [09/16/24 15:08:55.288]:Rest Driver PT:                  Token Value: {/}.
    [09/16/24 15:08:55.288]:Rest Driver PT:                  Arg Value: {/}.
    [09/16/24 15:08:55.288]:Rest Driver PT:              Action: do-clone-xpath(dest-expression="../instance[last()]",src-expression="$lvAttr").
    [09/16/24 15:08:55.288]:Rest Driver PT:            Performing actions for local-variable(current-node) = <id>.
    [09/16/24 15:08:55.288]:Rest Driver PT:              Action: do-set-local-variable("lvAttrName",scope="policy",token-xpath("name($current-node)")).
    [09/16/24 15:08:55.288]:Rest Driver PT:                arg-string(token-xpath("name($current-node)"))
    [09/16/24 15:08:55.288]:Rest Driver PT:                  token-xpath("name($current-node)")
    [09/16/24 15:08:55.288]:Rest Driver PT:                    Token Value: "id".
    [09/16/24 15:08:55.288]:Rest Driver PT:                  Arg Value: "id".
    [09/16/24 15:08:55.288]:Rest Driver PT:              Action: do-set-local-variable("lvAttrValue",scope="policy","$current-node$").
    [09/16/24 15:08:55.288]:Rest Driver PT:                arg-string("$current-node$")
    [09/16/24 15:08:55.289]:Rest Driver PT:                  token-text("$current-node$")
    [09/16/24 15:08:55.289]:Rest Driver PT:                    Expanded variable reference '$current-node$' to '27'.
    [09/16/24 15:08:55.289]:Rest Driver PT:                  Arg Value: "27".
    [09/16/24 15:08:55.289]:Rest Driver PT:              Action: do-set-local-variable("lvAttr",scope="policy",arg-node-set(token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)")))).
    [09/16/24 15:08:55.289]:Rest Driver PT:                arg-node-set(token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)")))
    [09/16/24 15:08:55.289]:Rest Driver PT:                  token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)"))
    [09/16/24 15:08:55.289]:Rest Driver PT:                    token-xml-parse(token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)"))
    [09/16/24 15:08:55.289]:Rest Driver PT:                      token-xpath("es:createXMLAttr($lvAttrName, $lvAttrValue)")
    [09/16/24 15:08:55.289]:Rest Driver PT:                        Token Value: "<attr attr-name="id"><value>27</value></attr>".
    [09/16/24 15:08:55.289]:Rest Driver PT:                      Arg Value: "<attr attr-name="id"><value>27</value></attr>".
    [09/16/24 15:08:55.289]:Rest Driver PT:                  Token Value: {/}.
    [09/16/24 15:08:55.289]:Rest Driver PT:                  Arg Value: {/}.
    [09/16/24 15:08:55.289]:Rest Driver PT:              Action: do-clone-xpath(dest-expression="../instance[last()]",src-expression="$lvAttr").
    [09/16/24 15:08:55.289]:Rest Driver PT:      Action: do-trace-message(token-operation()).
    [09/16/24 15:08:55.289]:Rest Driver PT:        arg-string(token-operation())
    [09/16/24 15:08:55.289]:Rest Driver PT:          token-operation()
    [09/16/24 15:08:55.290]:Rest Driver PT:            Token Value: "driver-operation-data".
    [09/16/24 15:08:55.290]:Rest Driver PT:          Arg Value: "driver-operation-data".
    [09/16/24 15:08:55.290]:Rest Driver PT:driver-operation-data
    [09/16/24 15:08:55.290]:Rest Driver PT:Policy returned:
    [09/16/24 15:08:55.290]:Rest Driver PT:
    <nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <driver-operation-data class-name="Telephone" command="poll" event-id="Rest Driver##12481615855##0">
          <response>
            <value>{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}</value>
          </response>
        </driver-operation-data>
        <instance class-name="Telephone" src-dn="14">
          <attr attr-name="telephoneNumber">
            <value>0701231211</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="id">
            <value>14</value>
          </attr>
        </instance>
        <instance class-name="Telephone" src-dn="6">
          <attr attr-name="telephoneNumber">
            <value>0701231211</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="id">
            <value>6</value>
          </attr>
        </instance>
        <instance class-name="Telephone" src-dn="27">
          <attr attr-name="telephoneNumber">
            <value>0701231212</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="id">
            <value>27</value>
          </attr>
        </instance>
      </input>
    </nds>
    [09/16/24 15:08:55.291]:Rest Driver PT:Applying policy: %+C%14CNETQRESTDCFG-itp-AddAssociation%-C.
    [09/16/24 15:08:55.291]:Rest Driver PT:  Applying to driver-operation-data #1.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Evaluating selection criteria for rule 'Check for association -ADD'.
    [09/16/24 15:08:55.291]:Rest Driver PT:      (if-operation match "status") = FALSE.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Evaluating selection criteria for rule 'Check for association - MODIFY'.
    [09/16/24 15:08:55.291]:Rest Driver PT:      (if-operation match "modify") = FALSE.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.291]:Rest Driver PT:  Applying to instance #2.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Evaluating selection criteria for rule 'Check for association -ADD'.
    [09/16/24 15:08:55.291]:Rest Driver PT:      (if-operation match "status") = FALSE.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Evaluating selection criteria for rule 'Check for association - MODIFY'.
    [09/16/24 15:08:55.291]:Rest Driver PT:      (if-operation match "modify") = FALSE.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.291]:Rest Driver PT:  Applying to instance #3.
    [09/16/24 15:08:55.291]:Rest Driver PT:    Evaluating selection criteria for rule 'Check for association -ADD'.
    [09/16/24 15:08:55.291]:Rest Driver PT:      (if-operation match "status") = FALSE.
    [09/16/24 15:08:55.292]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.292]:Rest Driver PT:    Evaluating selection criteria for rule 'Check for association - MODIFY'.
    [09/16/24 15:08:55.292]:Rest Driver PT:      (if-operation match "modify") = FALSE.
    [09/16/24 15:08:55.292]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.292]:Rest Driver PT:  Applying to instance #4.
    [09/16/24 15:08:55.292]:Rest Driver PT:    Evaluating selection criteria for rule 'Check for association -ADD'.
    [09/16/24 15:08:55.292]:Rest Driver PT:      (if-operation match "status") = FALSE.
    [09/16/24 15:08:55.292]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.292]:Rest Driver PT:    Evaluating selection criteria for rule 'Check for association - MODIFY'.
    [09/16/24 15:08:55.292]:Rest Driver PT:      (if-operation match "modify") = FALSE.
    [09/16/24 15:08:55.292]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.292]:Rest Driver PT:Policy returned:
    [09/16/24 15:08:55.292]:Rest Driver PT:
    <nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <driver-operation-data class-name="Telephone" command="poll" event-id="Rest Driver##12481615855##0">
          <response>
            <value>{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}</value>
          </response>
        </driver-operation-data>
        <instance class-name="Telephone" src-dn="14">
          <attr attr-name="telephoneNumber">
            <value>0701231211</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="id">
            <value>14</value>
          </attr>
        </instance>
        <instance class-name="Telephone" src-dn="6">
          <attr attr-name="telephoneNumber">
            <value>0701231211</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="id">
            <value>6</value>
          </attr>
        </instance>
        <instance class-name="Telephone" src-dn="27">
          <attr attr-name="telephoneNumber">
            <value>0701231212</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="id">
            <value>27</value>
     </attr>
        </instance>
      </input>
    </nds>
    [09/16/24 15:08:55.295]:Rest Driver PT:Applying schema mapping policies to input.
    [09/16/24 15:08:55.295]:Rest Driver PT:Applying policy: %+C%14CSchemaMap%-C.
    [09/16/24 15:08:55.295]:Rest Driver PT:  Mapping class-name 'Telephone' to 'User'.
    [09/16/24 15:08:55.295]:Rest Driver PT:  Mapping class-name 'Telephone' to 'User'.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Mapping class-name 'Telephone' to 'User'.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Mapping class-name 'Telephone' to 'User'.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Mapping attr-name 'telephoneNumber' to 'Telephone Number'.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Mapping attr-name 'id' to 'workforceID'.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Mapping attr-name 'telephoneNumber' to 'Telephone Number'.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Mapping attr-name 'id' to 'workforceID'.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Mapping attr-name 'telephoneNumber' to 'Telephone Number'.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Mapping attr-name 'id' to 'workforceID'.
    [09/16/24 15:08:55.296]:Rest Driver PT:Resolving association references.
    [09/16/24 15:08:55.296]:Rest Driver PT:No event transformation policies.
    [09/16/24 15:08:55.296]:Rest Driver PT:Applying publisher filter.
    [09/16/24 15:08:55.296]:Rest Driver PT:Publisher processing driver-operation-data for .
    [09/16/24 15:08:55.296]:Rest Driver PT:Applying command transformation policies.
    [09/16/24 15:08:55.296]:Rest Driver PT:Applying policy: %+C%14CNETQRESTDCFG-pub-ctp-ModifytoRename%-C.
    [09/16/24 15:08:55.296]:Rest Driver PT:  Applying to driver-operation-data #1.
    [09/16/24 15:08:55.296]:Rest Driver PT:    Evaluating selection criteria for rule 'Convert modify to rename'.
    [09/16/24 15:08:55.296]:Rest Driver PT:      (if-operation equal "modify") = FALSE.
    [09/16/24 15:08:55.296]:Rest Driver PT:    Rule rejected.
    [09/16/24 15:08:55.296]:Rest Driver PT:Policy returned:
    [09/16/24 15:08:55.297]:Rest Driver PT:
    <nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <driver-operation-data class-name="User" command="poll" event-id="Rest Driver##12481615855##0">
          <response>
            <value>{"users":[{"telephoneNumber":"0701231211","className":"User","id":"14"},{"telephoneNumber":"0701231211","className":"User","id":"6"},{"telephoneNumber":"0701231212","className":"User","id":"27"}]}</value>
          </response>
        </driver-operation-data>
      </input>
    </nds>
    [09/16/24 15:08:55.297]:Rest Driver PT:Filtering out notification-only attributes.
    [09/16/24 15:08:55.297]:Rest Driver PT:Pumping XDS to eDirectory.
    [09/16/24 15:08:55.297]:Rest Driver PT:
    DirXML Log Event -------------------
         Driver:   \NAME\system\driverset1\Rest Driver
         Channel:  Publisher
         Status:   Error
         Message:  Code(-9038) Element <driver-operation-data> found under <input> is not allowed.
    
    

  • 0 in reply to   

    I tried to strip the operation-data node and the error message dissapeared, but now it complains about the instance element:

    <nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <instance class-name="User" src-dn="14">
          <attr attr-name="Telephone Number">
            <value>0701231211</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="workforceID">
            <value>14</value>
          </attr>
        </instance>
      </input>
    </nds>
    [09/17/24 09:01:10.368]:Rest Driver PT:Filtering out notification-only attributes.
    [09/17/24 09:01:10.368]:Rest Driver PT:Pumping XDS to eDirectory.
    [09/17/24 09:01:10.368]:Rest Driver PT:
    DirXML Log Event -------------------
         Driver:   \NAME\system\driverset1\Rest Driver
         Channel:  Publisher
         Object:   14
         Status:   Error
         Message:  Code(-9038) Element <instance> found under <input> is not allowed.
    
    

  • 0   in reply to 

    Yes that error is correct, the code you use from my git repo only takes into consideration that an operation originates from the subscriber, not from a pull request.

    In this case you should test for 'command="pull"' and then instead of an <instance/> create an <add/>, then the matching policy will decide if it is a modify or an add.

    If you know that the objects exist then make it an <modify/> with an operational association, but then you really need to know that the object exist. Using the matching policy will probably be cleaner.

  • 0 in reply to   

    Thanks!

    I tried to do it simple for testing. Instead of creating a matching policy I created an <modify>, now everything seems to go through without any errors and he seems to find the objects. But the problem now is that the attribute is not being updated. Anything obvious I am missing (attached the trace):

    <nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <modify class-name="Telephone" src-dn="jjansson">
          <attr attr-name="telephoneNumber">
            <value>0701231211</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="id">
            <value>jjansson</value>
          </attr>
        </modify>
        <modify class-name="Telephone" src-dn="ktrötter">
          <attr attr-name="telephoneNumber">
            <value>0701231212</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="id">
            <value>ktrötter</value>
          </attr>
        </modify>
      </input>
    </nds>
    [09/23/24 11:54:34.377]:Rest Driver PT:Applying schema mapping policies to input.
    [09/23/24 11:54:34.377]:Rest Driver PT:Applying policy: %+C%14CSchemaMap%-C.
    [09/23/24 11:54:34.377]:Rest Driver PT:  Mapping class-name 'Telephone' to 'User'.
    [09/23/24 11:54:34.377]:Rest Driver PT:  Mapping class-name 'Telephone' to 'User'.
    [09/23/24 11:54:34.377]:Rest Driver PT:  Mapping attr-name 'telephoneNumber' to 'Telephone Number'.
    [09/23/24 11:54:34.377]:Rest Driver PT:  Mapping attr-name 'id' to 'workforceID'.
    [09/23/24 11:54:34.377]:Rest Driver PT:  Mapping attr-name 'telephoneNumber' to 'Telephone Number'.
    [09/23/24 11:54:34.377]:Rest Driver PT:  Mapping attr-name 'id' to 'workforceID'.
    [09/23/24 11:54:34.378]:Rest Driver PT:Applying policy: %+C%14CSCHEMA-pub-mp-Match on WorkforceID%-C.
    [09/23/24 11:54:34.378]:Rest Driver PT:  Applying to modify #1.
    [09/23/24 11:54:34.378]:Rest Driver PT:  Applying to modify #2.
    [09/23/24 11:54:34.378]:Rest Driver PT:P
    <nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <modify class-name="User" src-dn="jjansson">
          <attr attr-name="Telephone Number">
            <value>0701231211</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="workforceID">
            <value>jjansson</value>
          </attr>
        </modify>
        <modify class-name="User" src-dn="ktrötter">
          <attr attr-name="Telephone Number">
            <value>0701231212</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="workforceID">
            <value>ktrötter</value>
          </attr>
        </modify>
      </input>
    </nds>
    [09/23/24 11:54:34.379]:Rest Driver PT:Applying policy: %+C%14CSCHEMA-pub-pp.Publisher%-C.
    [09/23/24 11:54:34.379]:Rest Driver PT:  Applying to modify #1.
    [09/23/24 11:54:34.379]:Rest Driver PT:    Evaluating selection criteria for rule 'User Placement Policy'.
    [09/23/24 11:54:34.379]:Rest Driver PT:      (if-class-name equal "User") = TRUE.
    [09/23/24 11:54:34.379]:Rest Driver PT:    Rule selected.
    [09/23/24 11:54:34.379]:Rest Driver PT:    Applying rule 'User Placement Policy'.
    [09/23/24 11:54:34.379]:Rest Driver PT:      Action: do-set-local-variable("dn",scope="policy",token-global-variable("idv.dit.data.users")+"\"+token-src-dn()).
    [09/23/24 11:54:34.379]:Rest Driver PT:        arg-string(token-global-variable("idv.dit.data.users")+"\"+token-src-dn())
    [09/23/24 11:54:34.379]:Rest Driver PT:          token-global-variable("idv.dit.data.users")
    [09/23/24 11:54:34.379]:Rest Driver PT:            Token Value: "data\users".
    [09/23/24 11:54:34.379]:Rest Driver PT:          token-text("\")
    [09/23/24 11:54:34.380]:Rest Driver PT:          token-src-dn()
    [09/23/24 11:54:34.380]:Rest Driver PT:            Token Value: "jjansson".
    [09/23/24 11:54:34.380]:Rest Driver PT:          Arg Value: "data\users\jjansson".
    [09/23/24 11:54:34.380]:Rest Driver PT:    Evaluating selection criteria for rule 'Group Placement Policy'.
    [09/23/24 11:54:34.380]:Rest Driver PT:      (if-class-name equal "Group") = FALSE.
    [09/23/24 11:54:34.380]:Rest Driver PT:    Rule rejected.
    [09/23/24 11:54:34.380]:Rest Driver PT:    Evaluating selection criteria for rule 'Set Destination DN'.
    [09/23/24 11:54:34.380]:Rest Driver PT:    Rule selected.
    [09/23/24 11:54:34.380]:Rest Driver PT:    Applying rule 'Set Destination DN'.
    [09/23/24 11:54:34.380]:Rest Driver PT:      Action: do-set-op-dest-dn(arg-dn(token-local-variable("dn"))).
    [09/23/24 11:54:34.380]:Rest Driver PT:        arg-dn(token-local-variable("dn"))
    [09/23/24 11:54:34.380]:Rest Driver PT:          token-local-variable("dn")
    [09/23/24 11:54:34.380]:Rest Driver PT:            Token Value: "data\users\jjansson".
    [09/23/24 11:54:34.380]:Rest Driver PT:          Arg Value: "data\users\jjansson".
    [09/23/24 11:54:34.380]:Rest Driver PT:  Applying to modify #2.
    [09/23/24 11:54:34.380]:Rest Driver PT:    Evaluating selection criteria for rule 'User Placement Policy'.
    [09/23/24 11:54:34.380]:Rest Driver PT:      (if-class-name equal "User") = TRUE.
    [09/23/24 11:54:34.380]:Rest Driver PT:    Rule selected.
    [09/23/24 11:54:34.380]:Rest Driver PT:    Applying rule 'User Placement Policy'.
    [09/23/24 11:54:34.381]:Rest Driver PT:      Action: do-set-local-variable("dn",scope="policy",token-global-variable("idv.dit.data.users")+"\"+token-src-dn()).
    [09/23/24 11:54:34.381]:Rest Driver PT:        arg-string(token-global-variable("idv.dit.data.users")+"\"+token-src-dn())
    [09/23/24 11:54:34.381]:Rest Driver PT:          token-global-variable("idv.dit.data.users")
    [09/23/24 11:54:34.381]:Rest Driver PT:            Token Value: "data\users".
    [09/23/24 11:54:34.381]:Rest Driver PT:          token-text("\")
    [09/23/24 11:54:34.381]:Rest Driver PT:          token-src-dn()
    [09/23/24 11:54:34.381]:Rest Driver PT:            Token Value: "ktrötter".
    [09/23/24 11:54:34.381]:Rest Driver PT:          Arg Value: "data\users\ktrötter".
    [09/23/24 11:54:34.381]:Rest Driver PT:    Evaluating selection criteria for rule 'Group Placement Policy'.
    [09/23/24 11:54:34.381]:Rest Driver PT:      (if-class-name equal "Group") = FALSE.
    [09/23/24 11:54:34.381]:Rest Driver PT:    Rule rejected.
    [09/23/24 11:54:34.381]:Rest Driver PT:    Evaluating selection criteria for rule 'Set Destination DN'.
    [09/23/24 11:54:34.381]:Rest Driver PT:    Rule selected.
    [09/23/24 11:54:34.381]:Rest Driver PT:    Applying rule 'Set Destination DN'.
    [09/23/24 11:54:34.381]:Rest Driver PT:      Action: do-set-op-dest-dn(arg-dn(token-local-variable("dn"))).
    [09/23/24 11:54:34.381]:Rest Driver PT:        arg-dn(token-local-variable("dn"))
    [09/23/24 11:54:34.381]:Rest Driver PT:          token-local-variable("dn")
    [09/23/24 11:54:34.381]:Rest Driver PT:            Token Value: "data\users\ktrötter".
    [09/23/24 11:54:34.381]:Rest Driver PT:          Arg Value: "data\users\ktrötter".
    [09/23/24 11:54:34.382]:Rest Driver PT:Policy returned:
    [0<nds dtdversion="3.5" ndsversion="8.x">
      <source>
        <product build="20181130_1107" instance="Rest Driver" version="1.0.2.0">Identity Manager REST Driver</product>
        <contact>NetIQ Corporation.</contact>
      </source>
      <input>
        <modify class-name="User" dest-dn="data\users\jjansson" src-dn="jjansson">
          <attr attr-name="Telephone Number">
            <value>0701231211</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="workforceID">
            <value>jjansson</value>
          </attr>
        </modify>
        <modify class-name="User" dest-dn="data\users\ktrötter" src-dn="ktrötter">
          <attr attr-name="Telephone Number">
            <value>0701231212</value>
          </attr>
          <attr attr-name="className">
            <value>User</value>
          </attr>
          <attr attr-name="workforceID">
            <value>ktrötter</value>
          </attr>
        </modify>
      </input>
    </nds>9/23/24 11:54:34.382]:Rest Driver PT:
    [09/23/24 11:54:34.382]:Rest Driver PT:Resolving association references.
    [09/23/24 11:54:34.382]:Rest Driver PT:No event transformation policies.
    [09/23/24 11:54:34.382]:Rest Driver PT:Applying publisher filter.
    [09/23/24 11:54:34.383]:Rest Driver PT:  Filtered out <attr attr-name='Telephone Number'>.
    [09/23/24 11:54:34.383]:Rest Driver PT:  Filtered out <attr attr-name='className'>.
    [09/23/24 11:54:34.383]:Rest Driver PT:Publisher processing modify for jjansson.
    [09/23/24 11:54:34.383]:Rest Driver PT:Reading relevant attributes from data\users\jjansson.
    [09/23/24 11:54:34.383]:Rest Driver PT:
    <nds dtdversion="4.0" ndsversion="8.x">
      <source>
        <product edition="Advanced" version="4.8.7.0100">DirXML</product>
        <contact>NetIQ Corporation</contact>
      </source>
      <input>
        <query class-name="User" dest-dn="data\users\jjansson" scope="entry">
          <read-attr attr-name="Object Class"/>
        </query>
      </input>
    </nds>
    [09/23/24 11:54:34.383]:Rest Driver PT:Pumping XDS to eDirectory.
    [09/23/24 11:54:34.383]:Rest Driver PT:Performing operation query for data\users\jjansson.
    [09/23/24 11:54:34.383]:Rest Driver PT:--JCLNT-- \hostname\system\driverset1\Rest Driver - Publisher : Duplicating : context = 1134821547, tempContext = 1134821671
    [09/23/24 11:54:34.384]:Rest Driver PT:--JCLNT-- \hostname\system\driverset1\Rest Driver - Publisher : Calling free on tempContext = 1134821671
    [09/23/24 11:54:34.384]:Rest Driver PT:Read result:
    [09/23/24 11:54:34.384]:Rest Driver PT:
    <nds dtdversion="4.0" ndsversion="8.x">
      <source>
        <product edition="Advanced" version="4.8.7.0100">DirXML</product>
        <contact>NetIQ Corporation</contact>
      </source>
      <output>
        <instance class-name="User" event-id="0" qualified-src-dn="O=data\OU=users\CN=jjansson" src-dn="\hostname\data\users\jjansson" src-entry-id="35233">
          <attr attr-name="Object Class">
            <value timestamp="1724414360#373" type="string">User</value>
            <value timestamp="1724414360#374" type="string">customAttributes</value>
            <value timestamp="1724414360#375" type="string">Organizational Person</value>
            <value timestamp="1724414360#376" type="string">Person</value>
            <value timestamp="1724414360#377" type="string">ndsLoginProperties</value>
            <value timestamp="1724414360#378" type="string">Top</value>
            <value timestamp="1724415590#82" type="string">nrfIdentity</value>
            <value timestamp="1724415604#389" type="string">DirXML-EntitlementRecipient</value>
            <value timestamp="1724836724#31" type="string">srvprvEntityAux</value>
            <value timestamp="1724836900#24" type="string">pwmUser</value>
            <value timestamp="1725368841#32" type="string">DirXML-PasswordSyncStatusUser</value>
          </attr>
        </instance>
        <status event-id="0" level="success"></status>
      </output>
    </nds>
    [09/23/24 11:54:34.385]:Rest Driver PT:Optimize Modify determined operation not needed.
    [09/23/24 11:54:34.385]:Rest Driver PT:
    DirXML Log Event -------------------
         Driver:   \hostname\system\driverset1\Rest Driver
         Channel:  Publisher
         Object:   jjansson(data\users\jjansson)
         Status:   Success
    [09/23/24 11:54:34.385]:Rest Driver PT:Applying publisher filter.
    [09/23/24 11:54:34.385]:Rest Driver PT:  Filtered out <attr attr-name='Telephone Number'>.
    [09/23/24 11:54:34.385]:Rest Driver PT:  Filtered out <attr attr-name='className'>.
    [09/23/24 11:54:34.385]:Rest Driver PT:Publisher processing modify for ktrötter.
    [09/23/24 11:54:34.385]:Rest Driver PT:Reading relevant attributes from data\users\ktrötter.
    [09/23/24 11:54:34.385]:Rest Driver PT:
    <nds dtdversion="4.0" ndsversion="8.x">
      <source>
        <product edition="Advanced" version="4.8.7.0100">DirXML</product>
        <contact>NetIQ Corporation</contact>
      </source>
      <input>
        <query class-name="User" dest-dn="data\users\ktrötter" scope="entry">
          <read-attr attr-name="Object Class"/>
        </query>
      </input>
    </nds>
    [09/23/24 11:54:34.386]:Rest Driver PT:Pumping XDS to eDirectory.
    [09/23/24 11:54:34.386]:Rest Driver PT:Performing operation query for data\users\ktrötter.
    [09/23/24 11:54:34.386]:Rest Driver PT:--JCLNT-- \hostname\system\driverset1\Rest Driver - Publisher : Duplicating : context = 1134821547, tempContext = 1134821671
    [09/23/24 11:54:34.386]:Rest Driver PT:--JCLNT-- \hostname\system\driverset1\Rest Driver - Publisher : Calling free on tempContext = 1134821671
    [09/23/24 11:54:34.386]:Rest Driver PT:Read result:
    [09/23/24 11:54:34.386]:Rest Driver PT:
    <nds dtdversion="4.0" ndsversion="8.x">
      <source>
        <product edition="Advanced" version="4.8.7.0100">DirXML</product>
        <contact>NetIQ Corporation</contact>
      </source>
      <output>
        <instance class-name="User" event-id="0" qualified-src-dn="O=data\OU=users\CN=ktrötter" src-dn="\hostname\data\users\ktrötter" src-entry-id="35244">
          <attr attr-name="Object Class">
            <value timestamp="1724414361#620" type="string">User</value>
            <value timestamp="1724414361#621" type="string">customAttributes</value>
            <value timestamp="1724414361#622" type="string">Organizational Person</value>
            <value timestamp="1724414361#623" type="string">Person</value>
            <value timestamp="1724414361#624" type="string">ndsLoginProperties</value>
            <value timestamp="1724414361#625" type="string">Top</value>
            <value timestamp="1724415589#388" type="string">nrfIdentity</value>
            <value timestamp="1724415601#431" type="string">DirXML-EntitlementRecipient</value>
            <value timestamp="1725368847#36" type="string">DirXML-Identity</value>
            <value timestamp="1725368847#64" type="string">DirXML-PasswordSyncStatusUser</value>
          </attr>
        </instance>
        <status event-id="0" level="success"></status>
      </output>
    </nds>
    [09/23/24 11:54:34.387]:Rest Driver PT:Optimize Modify determined operation not needed.
    [09/23/24 11:54:34.387]:Rest Driver PT:
    DirXML Log Event -------------------
         Driver:   \hostname\system\driverset1\Rest Driver
         Channel:  Publisher
         Object:   ktrötter(data\users\ktrötter)
         Status:   Success
    
    
    

  • Verified Answer

    +1   in reply to 

    a) Your publisher filter removes the Telephone Number attribute:

    Filtered out <attr attr-name='Telephone Number'>.

    b) the structure beneath modify is different from add/instance. You are missing modify-attr elements:

    <modify class-name="User" src-dn="\Sam">
     <association>1012</association>
     <modify-attr attr-name="Given Name">
      <remove-all-values/>
      <add-value>
       <value>Samuel</value>
       </add-value>
     </modify-attr>
     <modify-attr attr-name="Telephone Number">
      <remove-value>
       <value>555-1212</value>
      </remove-value>
      <add-value>
       <value>555-1764</value>
       <value>555-1765</value>
      </add-value>
     </modify-attr>
    </modify>

  • 0 in reply to   

    Thanks much, it is now working!