cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass Repository ID into manual Provisionong task?

Former Member
0 Kudos

Hello Guru!

We have several SAP system where account name contains LastName, so periodically we need to delete users and create new one for people who change lastname.

We began to use IDM 7.2. But now I can't understand how to delete users and create them manually and correctly.

I did the following:

1. set the event task for "Modify" of MX_LASTNAME:

2. In "Rename" pass I execute my script "custom_manual_Provisioning":

the script:

function custom_manual_Provisioning(Par)

{

var MSKey = Par.get ("MSKey");

var TaskID = Par.get("TaskID");

var MyAudit = "";

var Repository = uGetRepositoryID();

uInfo("Repository=" + Repository);


MyAudit=uProvision(MSKey, TaskID, 0, Repository, "", 60);

}

But function  "uGetRepositoryID" returns value "-1" and task "Delete user" finished with error "Parameter backend host ('ashost') is missing", because task doesn't know in what Repository user has to be deleted.

How can I say to uProvision what repository it has to use to delete user? Do I need to get it via select from idmv_* tables or maybe there is some more simple way to Delete user manually?

Or maybe be my solution is fully incorrect and I need to do something other to manually delete and then create user?

Thanks in advance,

Natalia.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Natalia,

You have the user mskey. so get the list of repositories to which the user is assigned . i.e the attributes ACCOUNT<REPNAME>,

Write a script to split the list of account attribute, and get the repository names.

Say, ACCOUNTDEC|ACCOUNTPEC|ACCOUNTQEC are the account attributes for the user , then write the script such that it will return DEC,PEC, QEC . Now you have list of the repositories to be provisioned.

now use the uProvision script.

Hope this helps.

All the best,

~Krishna.

terovirta
Active Contributor
0 Kudos

Krishna Kumar Duddu wrote:

You have the user mskey. so get the list of repositories to which the user is assigned . i.e the attributes ACCOUNT<REPNAME>,

Write a script to split the list of account attribute, and get the repository names.

Say, ACCOUNTDEC|ACCOUNTPEC|ACCOUNTQEC are the account attributes for the user , then write the script such that it will return DEC,PEC, QEC . Now you have list of the repositories to be provisioned.

now use the uProvision script.

uProvision expects the repository id as parameter so you need to query the repository id from table mc_repository for the repository names you get from account-attributes.

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear all,

thank you a lot for provided help!

My script works now correctly!

Best regards,

Natalia.

Former Member
0 Kudos

Hi,

Usually a repository setting is inherited from the privilege triggering the workflow. If I understand your setup you can set this on the Rename task options/repository property. Seems its not possible to upload screenshots here at the moment so no picture... This would only initiate for a single repository though!

If you want a proper rename to go to all repositories where the user exists you should use the approach outlined by Krishna.

Br,

Per Christian