I am doing AD Group Attestation and need to pull the group manager from AD as the attestor. Here is the query I have and if I replace the @AttestationCase with an actual UID_AttestationCase and run in ObjectBrowser, it returns the correct Manager. When I run a test attestation, it aborts due to no approver. What am I missing???
select distinct
aa.uid_person as uid_person
from attestationCase as ac
join ADSGroup as ag on ag.XObjectkey = ac.Objectkey1
join ADSAccount as aa on aa.XObjectKey = ag.ObjectKeyManager
where ac.UID_AttestationCase = @AttestationCase
ac.ObjectKey1=<Key><T>ADSGroup</T><P>cba424a4-af8d-4fc1-ab93-83edfdd7afc0</P></Key>
ag.ObjectKeyManager = <Key><T>ADSAccount</T><P>12c3ea51-d987-4058-a62a-71e8d8829813</P></Key>
aa.UID_Person = 05fd8312-e600-4b63-a22c-95b38dc38844 (Desired Attestor)