Expand my Community achievements bar.

Elevate your expertise and be recognized as a true influencer! Nominations for the exclusive Adobe Community Advisor program 2023 are now OPEN.

Adding a user to a policy using Java API


Level 3

I am able to create a user and a policy using Java EJB, but I cannot find how to apply a user to a policy. Any help on this would be appreaciated.

1 Reply


Not applicable

//Create a PolicyEntry object

     PolicyEntry policyEntry = InfomodelObjectFactory.createPolicyEntry();

//Add the user to it as a principal


//Give permissions

     Permission perm = InfomodelObjectFactory.createPermission(Permission.COPY);


// Add the policyEntry object to the policy


//Update or register policy

     policyManager.registerPolicy(policy, policySetName);//if creating a new policy

     policyManager.updatePolicy(policy);//if updating an existing policy