Question

Import / Migration Job for User Grants

  • 2 November 2020
  • 3 replies
  • 471 views

Badge +2

Hi

Does anyone have a migration job that can import User Grants, i.e. User link to Permission Sets.

(I am not referring to the IMPORT EXPORT USER GRANTS function below, but rather a MIG job that can import this from an Excel, text or csv)

 

 


3 replies

Userlevel 7
Badge +18

We use PL/SQL when we need to do a lot of this.

BEGIN
   fnd_user_role_api.set_role('USER1', 'PERMISSION_SET1', TRUE);
   fnd_user_role_api.set_role('USER1', 'PERMISSION_SET2', TRUE);
   fnd_user_role_api.set_role('USER2', 'PERMISSION_SET1', TRUE);
   fnd_user_role_api.set_role('USER2', 'PERMISSION_SET2', TRUE);
   security_sys.refresh_active_list__(0);
END;
/

If you don't like that, you might consider building your own import XML. I’m attaching a template you might use to do this in Excel.

Userlevel 7

You can use FND_USER_ROLE_API in a migration job. If you need to grant more than one role you’d need to have multiple records in the Method List, something like below.
 

 

Badge +2

Thanks to both. We have a user that has access to several EU roles. I think MIG job could work easier.

I will also post if I have any other solutions I come across.

Our input file looks something like below

 

Reply