Skip to main content

Command Palette

Search for a command to run...

Unlock Oracle APEX application user APEX_UTIL. unlock_account

Oracle APEX 22.1

Updated
1 min read
Unlock  Oracle APEX application user APEX_UTIL. unlock_account

Often you get the requirement to provide the APEX application user unlock feature from a user interface. Oracle APEX provides APEX_UTIL. unlock_account which can be used to unlock a user account.

You can create a form with the user listing and provide a button to unlock the user. On button click, you can write a dynamic action to execute pl/sql server-side code.

begin

apex_util.unlock_account('user_to_unlock');

end;

So what happens when you click the button? You will get an error page as below if you have not modified the Application security definition attribute "Modify Workspace Repository ".

APEX - An API call has been prohibited. Contact your application administrator.

To avoid this error modify the Application definition. Go to App Builder >> Click on the application icon >> Click Edit

Check the "Modify Workspace Repository " check box and Apply

This will allow you to modify application security attributes in run time using API programming interface. ie package APEX_UTIL.UNLOCK_ACCOUNT.

Other provisions like Create User, Remove user, reset password etc can be developed.

S

helpful. Keep Shining !!