I cannot seem to get any result from RoleVault.getRoleAssignmentCause
This is the code I am trying.
I have made the user [S] on [root] to rule out rights.
Anyway, the event.getCustomData() is the users DN.
I am able to get a list of roles assigned using RoleVault.getRolesToUserAssignments.
But
var vIdBeans = RoleVault.getRoleAssignmentCause(event.getCustomDa ta(),currentBean.getTargetDn())
Returns a size of 0.
Can anyone see what is wrong?

var vRoleBeans = RoleVault.getRolesToUserAssignments(event.getCusto mData())
if(vRoleBeans.size()>0){
for (i = 0; i<vRoleBeans.size(); i++) {
var currentBean = vRoleBeans.get(i);
var vIdBeans = RoleVault.getRoleAssignmentCause(event.getCustomDa ta(),currentBean.getTargetDn())
form.showDebugMsg('IDBEANs Size: ' + vIdBeans.size() + "based on u:" + event.getCustomData() + ' and r: ' + currentBean.getTargetDn())
if (vIdBeans.size()>0) {
for (iX = 0; iX<vIdBeans.size(); iX++) {
// Fill in when I get to this
}
}
}
}

-Nicolai