Using the API to find users with no recent activity

With the new pricing model, we’ll be charged a fixed fee per user and to avoid incurring unnecessary charges, we need to find users who have not been active recently (e.g., in the last 2 months) and programmatically delete them from our QuickSight account. The last active date is shown on the UI but it’s not currently exposed in the API.

The API currently returns 0 for “lastUserActivityTime” for all users and I was told by AWS support that it’s 0 because the real value is not exposed externally.

This leaves us with no good way to delete thousands of inactive users other than to sort by the “Last active” column on the UI and manually delete every user one by one.

With the old usage-based pricing, we didn’t need to delete inactive users because we didn’t incur any charges for them.

1 Like

@Koushik_Muthanna
Can you please confirm that this is a limitation of the API? Can I request an enhancement to expose the value of “lastUserActivityTime” externally? I suspect this will be an issue for many existing accounts when the new pricing kicks in next May.

1 Like

@David_Wong ,

Yes using the API , the activity is not visible. Though the CloudTrail events log an event when a dashboard is opened by a user ( Tracking non-API events by using CloudTrail logs - Amazon QuickSight ) . This will help you get exact details on the dashboard user accessed, when they accessed it .

Kind regards,
Koushik

@Koushik_Muthanna

We would have to use CloudTrail logs to look for every instance of the GetDashboard event for every user in our QuickSight account and then use the QuickSight API to delete the user if they haven’t viewed a dashboard recently.

Can you still add a feature request to expose “lastUserActivityTime” externally in the QuickSight API? It’s already there but we just need to see the real value instead of 0. It would make finding and deleting inactive users much more straightforward.

@David_Wong ,

I do agree, tagging this post as a feature request.

Kind regards,
Koushik