03-28-2024 03:57 AM
Hi Folks,
Time flies, and we're already almost four months deep into 2024! As many organisations hustle to close the fiscal year of 2023, it's going to be a hectic month. And when it comes to budget talks, the echo through the halls remains: Spend cautiously. Continue cost saving.
That means more IT housekeeping — and, as always, I’m here to lend a hand (or a script). 🙂
This time around, we are shining a flashlight into the dark corners of your SSO applications, looking for signs of life. The goal? To unearth insights that will guide your decisions on where to allocate your SaaS budget wisely.
TL;DR - Here is the script on my repo.
Feel free to tweak the days if you are looking to dig deeper into the past, at line 17:
$Apps = Get-JcSdkApplication | select DisplayName,displaylabel,name,SsoUrl
$trackingDays = 30
$outCSVreport = @()
foreach ($app in $Apps){
$report = "" | select AppDN,AppLabel,SSOUrl,Unused,last_5_activities
$loggedOnEvents = get-jcevent -Service:('sso') -starttime:((get-date).AddDays(-$trackingDays)) `
-SearchTermAnd @{"application.display_label"=$app.DisplayLabel } -ErrorAction SilentlyContinue
$report.AppDN = $app.DisplayName
$report.AppLabel = $app.DisplayLabel
$report.SSOUrl = $app.SsoUrl
if ($null -ne $loggedOnEvents) {
Write-Host "$($app.DisplayName) has $($loggedOnEvents.Count) events in the past $trackingDays days!`n SSO url: $($app.SsoUrl)`n" -ForegroundColor Green
$report.Unused = $false
$report.last_5_activities = $loggedOnEvents | Join-String -Separator "`n"
}
else {
Write-Host "$($app.DisplayName) is not been accessed in the past $trackingDays days!`n SSO url: $($app.SsoUrl)`n"
$report.Unused = $true
$report.last_5_activities = 'N/A'
}
$outCSVreport += $report
}
$outCSVreport | Export-Csv InactiveSSO_report.csv
Its output on the screen like this:
And it will output a CSV report looks like this:
And there you have it! Hope it helps to make informed decisions and champion cost-saving measures.
A big shoutout to @sidhanth for sparking this idea! Happy cost-saving, folks!
03-28-2024 08:25 AM
This is a clever way of identifying unused apps and saving cash. Thanks for sharing.
New to the site? Take a look at these additional resources:
Ready to join us? You can register here.