I have a workflow that send an email notification after provisioning and trying to get the account attribute samaccountname in the email body.
I’m using the sp:get-accounts step, but when I try to reference $.getAccounts.accounts[0].attributes.sAMAccountName, the email shows the literal expression. Any working examples of the proper $.getAccounts.accountssyntax would be greatly appreciated.
Try something like this: $.getAccounts.accounts[?(@.sourceName=="Active Directory")].attributes.sAMAccountName
Note that if the value is blank, your email may contain the json expression. In a case like that, add a wait step if it’s a timing issue, or a workaround is to concat a space and trim the end