on 2016 Mar 08 8:58 AM
Hello all
we have an IdM 7.2 SP9, and i would like to know how i can mass change the e-mail adresses of my users, to make it effective in all the systems i have connected to IdM (ABAPs, JAVAs, HANAs, etc ...)
What i would like to do is change the e-mail adressof all my users from : xxx@company1.com to xxx@company2.com for example
Is that feasible? any advices?
Of course i can always do it manually user per user base ... But is there an automated way to do it ?
Thanks in advance for you help
BR
Y.
Request clarification before answering.
Hello Youssef,
Yes it is feasible and there are several way to achieve this.
P.S. - After writing the on-demand job, first test it for 1-2 users then go for mass-update.
Regards,
C Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Youssef,
I don't think that there is any documentation available regarding this however it is quite easy as just you need to write one on-demand job with one pass (If you want to follow the first approach).
Query in source should be like (replace USER with mskeyvalue of the user for which you want to test first)
select
b.mcvalue as mskeyvalue,
c.mcvalue as mail
from idmv_vallink_basic a,
idmv_vallink_basic b,
idmv_vallink_basic c
where a.mcAttrName='MX_ENTRYTYPE'
and a.mcvalue='MX_Person'
and b.mcAttrName='MSKEYVALUE'
and c.mcAttrName='MX_MAIL_PRIMARY'
and a.mskey=b.mskey
and b.mskey=c.mskey
and b.mcsearchvalue like 'USER'
while script should be like-
// Main function: z_change_mail_address
function z_change_mail_address(Par){
//Example calling DSE internal function
//uStop("Terminated by user");
var oldMail = Par;
//uErrMsg(1,"Old Mail Address: " +oldMail);
var newMail = oldMail.replace("@xyz.com", "@abc.com");
//uErrMsg(1,"New Mail Address: " +newMail);
return newMail.toUpperCase();
}
Hope it will help.
Regards,
C Kumar
Woah Kumar,
that's a pretty complicated SQL statement for the quite simple data pool in the source tab.
I just use this:
select mcmskey as mskey from idmv_entry_simple where mcentrytype = 'MX_PERSON' and
mcmskey in (select distinct mskey from idmv_value_basic where attrname = 'MX_MAIL_PRIMARY')
and mcmskey = <mskey of testuser>
Get me every person with an email address (for example here). And in my script in the destination tab I use the internal "uReplaceString" function.
@Youssef: You'll find documentation on the function in the IDM help of the MMC. So feeding it with the needed parameters should be easy then.
Regards,
Steffi.
Hi Steffi,
Above SQL doesnt fetch email address to do the string manipulation.
Hi Youssef,
The Source SQL can be more simpler as below,
select mskey, searchvalue from idmv_value_basic with(nolock) where attrname = 'MX_MAIL_PRIMARY'
Destination tab be like,
MSKEYVALUE = %MSKEYVALUE%
changetype = Modify
MX_MAIL_PRIMARY = $FUNCTION.z_change_mail_address(%searchvalue%)$$
Note: make sure you check "Use Identity Store" check box in source tab and select appropriate IDS.
Kind regards,
Jai
Hey Jai,
I don't need the email value in the source. My destination looks like this:
MSKEYVALUE = %MSKEYVALUE%
MX_MAIL_PRIMARY = $FUNCTION.isv_replaceCharacter(%MX_MAIL_PRIMARY%!!<search for>!!<replace by>)$$
And to make my life easier, I use job constants for the attributename, <search for> and <replace by>, so I can switch it around faster.
That means, I have 3 parameters in the script, but this way, it's easy to re-use the job. And you don't need to change a thing in the job settings, just the job constants.
But I guess, we all have our preferences.
Regards,
Steffi.
Works like a charm ! thanks all !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello all
thanks for your answers ... I will try that.
If I get it right, the difference betwenn the two methods is that the first one will do the research, and the replace in the same action. For the second method, i have to provide the text file with all the users and passwords, and then the second step will update it? is that right ?
Y.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Youssef,
with the exception, that you need "the users and email addresses" (not passwords, but I bet that was a typo), you're right.
The second approach is good, when the changes are all over the place (like not just changing to one new email address, but to change some addresses to "@company12.com" and some to "@company14.com" etc). Then it is easier to just create a file with all the new values and overwrite the current values.
Regards,
Steffi.
Hello Youseef.
The first solution is best (one shot operation) when you want to change all user's email address from user1@xyz.com to user1@abc.com.
The second solution is best when the requirement is to change email address to different value for different users.
for example -
user1@xyz.com to user1@abc.com
user2@wxyz.com to user2@abcd.com
user3@xyz.com to user1@mnp.com
in this case you have to pass all user's data like below in text file in TO ASCII FILE
Mskeyvalue;oldEmailAddress;Newmail addree
user1;user1@xyz.com;user1@abc.com
user2;user2@wxyz.com;user2@abcd.com
user3;user3@xyz.com;user3@mnp.com
Regards,
C Kumar
Hi Youssef,
The best option(I prefer) is as suggested by C Kumar
on-demand job with to passes - first is From Ascii Pass and second is To Identity Store pass. In this case you need to pass all the user's mskeyvalue and new email address in text file.
Here get all the user's Mskeyvalues and new email address and store in Temp table in the From ASCII pass.And in To IDS pass in the source tab, get all all the mskeyvalues from temp table, which are stored in previous pass and in Destination set mail with Replace option {R} followed by mail attribute.
It is always recommended to test for 1 or 2 users ids, before implementing for whole user.
Regards,
Jaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.