...
A typical case scenario is having security/compliance policies that enforce user account deactivations on specific platforms, like Jira, whenever a user account's last login reaches a specific aging (days from the current date the user account hasn't logged in to Jira)
Using Customers can automate this task using PS and SIL routines (scripting), a customer can automate this task.
\uD83D\uDCD8 Instructions
Info |
---|
IMPORTANT: This how-to procedure assumes the customer has successfully exported the user’s account information from Jira, including the account username and last login fields, into a CSV (comma-separated values) file. |
...
Code Block | ||
---|---|---|
| ||
struct Login { // Login struct created to handle CSV file data string username; string last_login; } Login [] fileContent = readFromCSVFile("users.csv", true); // CSV file reading process for (Login l in fileContent) { date last_login = parseDate("MM/dd/yyyy", l.last_login); // Date conversion from CSV file if (last_login < (currentDate() - "90d")) { // Checking user account aging status runnerLog("Last login on " + last_login); runnerLog(l.username); runnerLog("Aged account: true"); boolean deactivated = admDeactivateUser(l.username); // User account is aged, so deactivation is attempted if (deactivated) { // User account deactivation was successful runnerLog(l.username); runnerLog(" - User account deactivation was successful"); } else { // User account deactivation couldn't be performed runnerLog(l.username); runnerLog(" - User account deactivation was unsuccessful"); } } else { runnerLog("Last login on " + last_login); runnerLog(l.username); runnerLog("Aged account: false"); } } |
Script execution (output example):
\uD83D\uDCCB Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|