Advanced Policy Violation Rule

I understand that, the issue I’m facing is, if a Role is having “Classifications” attribute value when I request that particular role, it is not appearing in “reqIdRoles” list and it is directly appearing in Access Request.

Example:

Role1: with attributes name: test, Classifications: [c1,c2], Owner: ownerName, Type: IT, Description: test decription etc..

Role2: with attributes name: test, Owner: ownerName, Type: IT, Description: test decription etc.. (Classifications attribute left blank).

Now, I request Role1 and Role2 thenreqIdRoles.size() should be [2+asigned roles count], but I’m getting only [Role2+asigned roles] in reqIdRoles

List reqIdRoles = reqIdentity.getAssignedRoles();

Got a curious question - What will happen if we create ‘Advanced’ policy but do not create/output a PolicyValidation object (or) send a null one?

Will it work?

Hi,
My use case is a little different
I want to check the country of the user and the region of the application
for Ex: My Identity has country as Ind and application region is also Ind policy violation should not occur

but if my country is IND and I am requesting for application region UAE policy violation should occur

Thank You

Nicely articulated @KRM7 , thank you for sharing it. Appreciate your effort :clap:.