Hi Jasmine and Jahanzaib,
Thanks for the help!
We are able to send the custom message for OTP by modifying some inbuilt scripts.
From infoMap we set one attribute -
IDMappingExtUtils.setSPSSessionData("MSG","some custom message");
Then we extracted the MSG attribute in the OTPDeliver mapping rule.
var customMessage = IDMappingExtUtils.getSPSSessionData("MSG");
var ctxOTPFormatted = new Attribute("otp.sts.otp-formatted", "otp.sts.type", customMessage+otpFormatted );
stsuuCtxAttrs.setAttribute(ctxOTPFormatted);
as ctxOTPFormatted attribute is replaced by @OTP_STRING@ in sms_message.xml/email_message.xml template file.
In this way, we are able to send a custom message for SMS/Email OTP.
we referred to the below blog.
https://www.ibm.com/blogs/sweeden/branching-authentication-policy-isam-advanced-access-control/------------------------------
Mukesh
------------------------------
Original Message:
Sent: Wed January 20, 2021 06:26 PM
From: Jasmine Smith
Subject: ISAM - How to add custom message in SMS OTP(mac) delivery.
Hi Mukesh,
After investigating a bit further, it looks like at the moment we don't support custom macros in Email OTP or SMS OTP XML payloads (I was confusing the OTP pages with the XML template that is sent to the user's device).
But it does look like we support template scripting in those XML pages. If you'd prefer the simpler custom macros, I'd suggest opening an RFE.
------------------------------
Jasmine
Original Message:
Sent: Mon January 18, 2021 05:17 AM
From: Mukesh Bhati
Subject: ISAM - How to add custom message in SMS OTP(mac) delivery.
Hi Jasmine,
Tried setting a custom message in MACRO from the decision mapping rule.
But still same, nothing is populating in the SMS template.
------------------------------
Mukesh
Original Message:
Sent: Thu January 14, 2021 12:21 AM
From: Jasmine Smith
Subject: ISAM - How to add custom message in SMS OTP(mac) delivery.
Hi Mukesh,
Have you tried setting the macro within the decision mapping rule?
Macros are generally scoped to within a single mechanism, not the whole policy, except within Decisions (macros set in the decision mapping rule will be available to any mechanisms within a branch).
------------------------------
Jasmine
Original Message:
Sent: Wed January 13, 2021 08:37 AM
From: Mukesh Bhati
Subject: ISAM - How to add custom message in SMS OTP(mac) delivery.
Hi Jahanzaib,
Yes, infoMap is ending with success.setValue(true) but policy is ending with success.endPolicyWithoutCredential(); which is last step.
------------------------------
Mukesh
Original Message:
Sent: Tue January 12, 2021 03:21 PM
From: Jahanzaib Sarwar
Subject: ISAM - How to add custom message in SMS OTP(mac) delivery.
Hi Mukesh,
Are you ending your InfoMap with success.setValue(true);?
Also, is your MAC OTP mechanism defined after the InfoMap mechanism in the authentication policy steps sequence?
Regards,
------------------------------
Jahanzaib Sarwar
Original Message:
Sent: Mon January 11, 2021 08:40 AM
From: Mukesh Bhati
Subject: ISAM - How to add custom message in SMS OTP(mac) delivery.
Hi Jahanzaib,
Thanks for your response!
I have already configured this way even tried with macros also.
------------------------------
Mukesh
Original Message:
Sent: Mon January 11, 2021 08:10 AM
From: Jahanzaib Sarwar
Subject: ISAM - How to add custom message in SMS OTP(mac) delivery.
Hi Mukesh,
Try the following:
//In InfoMap:
context.set(Scope.SESSION, "urn:ibm:security:asf:response:token:attributes", "variableName", "custom_message");
//In sms_message.xml
Access it using @variableName@
Hope it helps.
Regards,
Jahanzaib
------------------------------
Jahanzaib Sarwar
Original Message:
Sent: Mon January 11, 2021 07:32 AM
From: Mukesh Bhati
Subject: ISAM - How to add custom message in SMS OTP(mac) delivery.
Hello Team,
I want to add a custom message to sms_message.xml(OTP delivery) from infoMap.
I have tried with macros and attributes set in session context but it's not working.
Any pointers would be helpful.
------------------------------
Mukesh
------------------------------