I am using OES 11g API for performing deletion of application roles of a specific application.
Here is the sample code snippet. However you can refer the OES 11g documentation how to programatically delete OES objects using API.
//get the AppRoleManager
AppRoleManager appRoleManager = Trading.getAppRoleManager();
//delete the AppRoleEntry
While trying to delete the application role, I got the below error as shown in screenshot. However while using the below code snippet for retrieving the application roles of an application, it exists.
To fix this issue, I had re-distributed the policies again from OES 11g Admin console. Therefore all the objects existing in SM cache were cleared after distributing the policies. Thus while retrieving the application roles of an application, it showed proper results.
I hope this is useful.