Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Task is not getting created when we are using Dataset inside Analytics

User_ID_Singh1
New Contributor III
New Contributor III

Hi,

We have a requirement where we have to create disable account task for the inscope applications for that we are creating datasets where we are storing endpointname and endpointkey and relating this inside analytics for creating tasks. Please let me know if am missing anything

Query:
SELECT distinct u.username,u.displayname as 'User Full Name',u.email, a.name 'Application Account Name',a.accountkey as acctKey, e.displayname 'Application Name', a.CREATED_ON 'Account Creation Date', CASE WHEN a.status = 1 THEN 'ACTIVE' ELSE a.status END AS 'Account Status', a.lastlogondate, 'disableAccount' as 'Default_Action_For_Analytics' FROM accounts a inner join endpoints e on a.ENDPOINTKEY=e.ENDPOINTKEY inner join dataset_values ds on ds.attribute2= e.endpointkey inner join user_accounts ua on a.accountkey=ua.accountkey inner join users u on u.userkey = ua.userkey where date(a.lastlogondate) = CURDATE() - INTERVAL 90 DAY and ds.attribute2=e.endpointkey

17 REPLIES 17

pmahalle
All-Star
All-Star

Hi @User_ID_Singh1 ,

Query returning result when ran in Data Analyzer? Can you try that once and check the result. Also make sure to checked the Save Data option for field Where do you want to save your data?

pmahalle_0-1723807804734.png

 


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

vivekmistry
New Contributor III
New Contributor III

vivekmistry_0-1723810713575.png

Yes query working in data analyser

@vivekmistry 

You are triggering the analytics though Job or executing manually?


Pandharinath Mahalle(Paddy)
If this reply helps your question, please consider selecting Accept As Solution and hit Kudos 🙂

vivekmistry
New Contributor III
New Contributor III

we tried both ways Job and manual, no help

NM
Honored Contributor II
Honored Contributor II

Hi @vivekmistry , try what I suggested below once..

  • Did you selected disable account under allowed action in analytics configuration?
  • did you selected take default action checkbox under job configuration?

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Yes all the configuration is in place.

vivekmistry_0-1723816804090.png

 

Task getting created for this query:

SELECT distinct u.username,u.displayname as 'User Full Name',u.email, a.name 'Application Account Name',a.accountkey as acctKey, e.displayname 'Application Name', a.CREATED_ON as 'Account Creation Date', CASE WHEN a.status = 1 THEN 'ACTIVE' ELSE a.status END AS 'Account Status', a.lastlogondate, 'disableAccount' as Default_Action_For_Analytics FROM accounts a inner join endpoints e on a.ENDPOINTKEY=e.ENDPOINTKEY  inner join user_accounts ua on a.accountkey=ua.accountkey inner join users u on u.userkey = ua.userkey where date(a.lastlogondate) =DATE_SUB(CURDATE(), INTERVAL 90 DAY) and e.customproperty31= 'True'

 But task is not getting created for query :

SELECT distinct u.username,u.displayname as 'User Full Name',u.email, a.name 'Application Account Name',a.accountkey as acctKey, e.displayname 'Application Name', a.CREATED_ON 'Account Creation Date', CASE WHEN a.status = 1 THEN 'ACTIVE' ELSE a.status END AS 'Account Status', a.lastlogondate, 'disableAccount' as Default_Action_For_Analytics FROM accounts a inner join endpoints e on a.ENDPOINTKEY=e.ENDPOINTKEY inner join dataset_values ds on ds.attribute2= e.endpointkey inner join user_accounts ua on a.accountkey=ua.accountkey inner join users u on u.userkey = ua.userkey where date(a.lastlogondate) =DATE_SUB(CURDATE(), INTERVAL 90 DAY) and ds.attribute2=e.endpointkey

 

SELECT DISTINCT 
    u.username,
    u.displayname AS 'User Full Name',
    u.email, 
    a.name AS 'Application Account Name',
    a.accountkey AS acctKey, 
    e.displayname AS 'Application Name', 
    a.CREATED_ON AS 'Account Creation Dat', 
    CASE WHEN a.status = 1 THEN 'ACTIVE' ELSE a.status END AS 'Account State', 
    a.lastlogondate as 'Last Login', 
    'disableAccount' AS Default_Action_For_Analytics 
FROM 
    accounts a 
    INNER JOIN endpoints e ON a.ENDPOINTKEY = e.ENDPOINTKEY  
    INNER JOIN user_accounts ua ON a.accountkey = ua.accountkey 
    INNER JOIN users u ON u.userkey = ua.userkey 
WHERE 
    DATE(a.lastlogondate) = CURDATE() - INTERVAL 90 DAY 
    AND e.customproperty31 = 'True';

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

With using CP31 we are able to create the task, but we have to use datasets table for creating task.

Does attribute 2 contains proper endpointkey ?

 

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Yes:

vivekmistry_0-1723818447045.png

vivekmistry_1-1723818554590.png

 

 

 

NM
Honored Contributor II
Honored Contributor II

Hi @vivekmistry I will suggest create a new analytics.

You have not specified dataset name

SELECT DISTINCT 
    u.username,
    u.displayname AS 'User Full Name',
    u.email, 
    a.name AS 'Application Account Name',
    a.accountkey AS acctKey, 
    e.displayname AS 'Application Name', 
    a.CREATED_ON AS 'Account Creation Dat', 
    CASE WHEN a.status = 1 THEN 'ACTIVE' ELSE a.status END AS 'Account State', 
    a.lastlogondate as 'Last Login', 
    'disableAccount' AS Default_Action_For_Analytics 
FROM 
    accounts a 
    INNER JOIN endpoints e ON a.ENDPOINTKEY = e.ENDPOINTKEY  
    INNER JOIN user_accounts ua ON a.accountkey = ua.accountkey 
    INNER JOIN users u ON u.userkey = ua.userkey 
	inner join dataset_values ds on ds.attribute2= e.endpointkey
WHERE 
    DATE(a.lastlogondate) = CURDATE() - INTERVAL 90 DAY 
	AND ds.attribute2=e.endpointkey
	And ds.datasetname='RUSHI'

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Thanks it worked

Please click the 'Accept As Solution' button on the reply  that best answers your original question and hit 'Kudos' button 👍.


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Honored Contributor II
Honored Contributor II

Hi @User_ID_Singh1 , if you are creating task using analytics job

Add below in your query

sysdate() as currentDate

rahul_p
Regular Contributor III
Regular Contributor III

Hello @User_ID_Singh1 ,

Can you check the logs when running the analytics and share those here please?

Thanks!

Regards,
Rahul
Please accept this as solution & give kudos if it resolves your issue.