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?

Parents
  • 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

  • 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)" ?

Reply Children
  • 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.