Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

I want to trigger an email notification user/group using analytics/query - disconnected app

thesvg
New Contributor III
New Contributor III

I have a situation where, when a user is given birthright access via enterprise roles to a disconnected application, I need a query to trigger email notification to admin or admin groups to execute tasks. Endpoint level email template only triggers when the task inside saviynt is marked complete, that is not ideal as we have to notify the admins to provision access first before marking the task complete. Can someone help with this query/analytics and process?

10 REPLIES 10

rushikeshvartak
All-Star
All-Star

SELECT 'admin' AS username,
       TASKKEY,
       A.ACCOUNTNAME,
       A.STATUS,
       E.ENDPOINTNAME
FROM   ARSTASKS A,
       ENDPOINTS E
WHERE  A.ENDPOINT = E.ENDPOINTKEY
       AND A.STATUS = 1
       AND A.OWNERTYPE = 2 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

is there a way to spit these results into the body of the email template? instead of going the analytics report route?

Currently No its not supported Please raise support/idea ticket


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

CR
Regular Contributor III
Regular Contributor III

need to prepare query based analytics object print in email template , you will get results in email template

reference article :

https://forums.saviynt.com/t5/identity-governance/analyticsdata-and-analyticsdatamap-are-not-working...

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

thesvg
New Contributor III
New Contributor III

@CR thanks for the link to the post. Played around with it and it works. 

Please click the 'Accept As Solution' button on the reply (or replies) that best answered your original question.


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

sk
All-Star
All-Star

@thesvg : We have similar requirement in our environment and noticed that Saviynt is not sending task creation endpoint level emails and opened a ticket support and we were told there is a known bug about this. Currently awaiting for confirmation and version in which it is fixed. 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

thesvg
New Contributor III
New Contributor III

this is great info, thank you @sk. Kindly provide info when you receive an update. 

thesvg
New Contributor III
New Contributor III

Approach I took to complete this exercise, thanks @CR for the other forum post link with a similar issue:

  • Create a analytics configuration that will pull all pending tasks/new tasks created for disconnected application access/account request via birthright/technical or user update rules.
  • Note, access type needs to either requestable or if not requestable (none create task) to enable provisioning action
  • Global Config setting: make sure that Group emails by username is enabled under Analytics config.
  • Analytics config:

SELECT u.username, u.username as 'endpoint owner', A.TASKKEY as 'taskkey', A.ACCOUNTNAME as 'accountname', A.STATUS as 'taskstatus', E.ENDPOINTNAME as 'endpoint', A.OWNERTYPE, U.EMAIL  FROM ARSTASKS A JOIN ENDPOINTS E ON A.ENDPOINT = E.ENDPOINTKEY JOIN USERS U ON E.OWNERKEY = U.USERKEY WHERE E.customproperty6= 'disconnected' AND A.STATUS = 1

order by username;

  • We are retrieving information about the user (u.username), endpoint owner (again u.username as 'endpoint owner') (specifying this again seems to be a requirement from a forum post), task key (A.TASKKEY as 'taskkey'), account name (A.ACCOUNTNAME as 'accountname'), task status (A.STATUS as 'taskstatus'), endpoint name (E.ENDPOINTNAME as 'endpoint'), owner type (A.OWNERTYPE), and email (U.EMAIL).
  • We are then querying ARSTASKS for all request info about the tasks created, for the tasks in status =1 (new) and joining endpoint information.
  • We are then joining userkey with ownerkey on endpoint, so this allows to map the owner and retrieve their username.
  • Note: that 'Username' appears to be a required field to pull information from Analytics object into the email body. No documentation available on this, forum posts are vague at best.
  • So, to send email to the endpoint owner, Username was mapped to endpoint ownerkey and retrieved into the body and reused in To: field.
  • Email Template: Text can be modified according to standards needed.
    • Make sure that Advanced HTML CSS is enabled.
<html>

<head>

<style>

table {

 font-family: arial, sans-serif;

 border-collapse: collapse;

 width: 100%;

}



td, th {

 border: 1px solid #dddddd;

 text-align: left;

 padding: 8px;

}



tr:nth-child(even) {

 background-color: #dddddd;

}

</style>

</head>

<body>

Hi Endpoint Owner,<br><br>

The following user(s) hav been assigned account/access to your disconnected application. Please find the details below:<br><br>

<table>

<tr><th>Endpoint Owner</th><th>Account Name</th><th>Endpoint</th><th>Task Key</th></tr>

<% int count=Integer.parseInt("${ANALYTICSDATA.Application.size()}"); for(int i=0;i<count;i=i+1){%><tr><td>${ANALYTICSDATA.'endpoint owner'[i]}</td><td>${ANALYTICSDATA.'accountname'[i]}</td><td>${ANALYTICSDATA.'endpoint'[i]}</td><td>${ANALYTICSDATA.'taskkey'[i]}</td></tr>

<% } %>

</table>
  • Endpoint owner, account name, endpoint name and task key are provided in the body for ease of access.
  • Test performed with two different endpoints and two different endpoint owners.
  • Email was sent to endpoint owners separately for their respective endpoints.
  • To achieve this, I added 'disconnected' in a customproperty on endpoint, so we need not create separate queries for each endpoint.
  • Once defined and analytics set up to run on a schedule, this process will be automated.

CR
Regular Contributor III
Regular Contributor III

Great, thanks for info.


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.