As you may be aware of Splunk's Security Content.. for example, for linux user creation https://research.splunk.com/endpoint/51fbcaf2-6259-11ec-b0f3-acde48001122/
on this, there are 2 macros they use.. one macro is:
actually how to implement/create this macro please.
More often than not, you will have macro already available from the app (ESCU/SSE/ES), all you need to do is update the parameters from Settings -> Advance Search -> Search macros -> Select Macro and update the same.
Please note that in the cases like whitelisting indexes for CIM or other such applications, there would be configuration page where it will ask you for the list of indexes and it will automatically update the Macro.
If this answer have helped you, feel free to accept the same 🙂