Friday, February 26, 2016

Script (API ) To add and revoke the User Roles in User Managment



1. Assign role to a user using an API

To assign role to a user using APIs, use the following API wf_local_synch.PropagateUserRole.

Select * from UMX_ALL_ROLE_VL --> Gives List of all available Roles with Role Key.

Example:
Begin
wf_local_synch.PropagateUserRole(
     p_user_name => '&USER_NAME',
     p_role_name => '&ROLE_KEY');
commit;
end;

2. Revoke an Indirect Responsibility

To revoke an indirect responsiblity (roles assigned using UMX) assignment to a user using APIs, use the following API Wf_local_synch.PropagateUserRole.

Example:


Begin
Wf_local_synch.PropagateUserRole(
       p_user_name => '&USER_NAME',
       p_role_name => '&ROLE_KEY',
       p_start_date=>'&Start_Date',
       p_expiration_date=>'&End_Date');
commit;
End;

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.