Hi Jahanzaib,
It is not exactly clear what you want to do. Are we talking about the same authentication policy but two different mechanisms? It is possible to share information from one mechanism to a subsequent one, but not in the @MACRO@. The scope of the @MACRO@ seems to be local.
To pass an attribute from one mechanism to the next you have to put it in the session:
context.set(Scope.SESSION, "urn:ibm:security:asf:response:token:attributes", "macroToSave", "some_value");
Later you can retrieve it and put it in the macro:
var macroToSave = context.get(Scope.SESSION,"urn:ibm:security:asf:response:token:attributes", "macroToSave");
macros.put("@MACRO@", macroToSave);
So if you can execute your own script in the subsequent mechanism it is easy. For mechanisms where you can't use your own script this is of course impossible. But perhaps you can expand a little on what the subsequent mechanism is. I had problems with the built-in "Email Message" mechanism because it was not clear for me how to set the macros. It was only after quite some try and error that I found out that although the format in the template is also @macro@, the value is actually taken from the credential.
So to use an attribute @myMacro@ in your template you first have to put it in the credential :
context.set(Scope.SESSION, "urn:ibm:security:asf:response:token:attributes", "myMacro", "some_value");
Hope this helps.
------------------------------
Laurent LA Asselborn
------------------------------