This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trigger Attestation for selected objects using SOAP service call?

Hi Guys, Has anyone tried triggering attestation policy for selected objects using One Identity SOAP/REST service call?  I'm working on an automated testing solution where we could test the attestation functionality by triggering attestation policy for selected objected through our automated processes calling D1IM SOAP service and then validate the results. Any suggestions?

  • I would create a script that creates the attestation cases for your attestation policy. The script can use a method available at enabled AttestationPolicy objects that allow you to specify the object keys you want to attest.

    You can check the available methods in the object properties windows, tab called Methods. The method for your case would be CreateAttestations(String[] objectKeys) which takes an string array of object keys you want to attest using the current attestation policy. It returns an array of DBObjectKey objects.

    So you just need to call the script using the SOAP / REST API.

    HtH

  • Thank you, that is exactly what I was looking for. I will try that.
  • Hi Markus,

    I have one question on how to raise attestation cases using script. Where are we going to specify the attestation policy name and detail when we call the method "CreateAttestations(String[] objectKeys)" ?

  • I am quoting my own post here ...

    "The script can use a method available at enabled AttestationPolicy objects ..."

    Your script has to load the attestation policy you want to create attestations for and then call the method.

  • Hi Ruchita,

    You can create something like following:

    Public Function CCC_AttestationPolicy_CreateForSingleObject(ByVal uidAttestationPolicy As String, ByVal objectkey As String) As String

      Try

       Dim policy As ISingleDbObject = Connection.CreateSingle("AttestationPolicy", uidAttestationPolicy)

       Dim objectKeyAttestationCase As String = policy.Custom.CallMethod("CreateAttestation", objectkey).ToString

       Return objectKeyAttestationCase

      Catch ex As Exception

       Return String.Empty

      End Try

    End Function

    Here uidAttestationPolicy is the policy you want to trigger and objectkey is pointing to the record you want policy to be triggered against.

    Hope it helps.

     

  • Hi,

    I am trying to pass string array of object keys in  "CreateAttestations" method but it is throwing error "ArrayConverter cannot convert from System.String". Where am I going wrong?

  • Hi Markus,

    I am trying to pass string array of object keys for "CreateAttestations(Sting[] objectKeys)" mehtod in below formats

    1. ObjectKey1,ObjectKey2

    2. "ObjectKey1","ObjectKey2"

    But the method is not accepting these values. Is this the correct way of passing these values?

  • Where do you pass these values? In coder or where?

  • I am testing in Object browser itself. What is the format required? should it be comma separated values or should it be in other format?

  • As you have experienced, the ArrayConverte does not support to convert from Strings, means you cannot test it in the ObjectBrowser.

    Usually, I am testing it with a simple script in the System Debugger.