Hi All
Happy New Year, Everyone!
It’s been a while since my last post, and I’m excited to return with an update. Back in 2021, I wrote an article on how to find multiple accounts in sources via Excel, which received a great deal of attention. Since then, the UI has changed, and I’ve also come up with a better formula to make the process even easier.
Here are the updated steps to follow:
1. Generate the Identities Report:
Start by navigating to Admin -> Identity Management -> Identities UI and download the CSV file by clicking the Export button.
2. Open the CSV in Excel:
Once you open the CSV file, look for the column labeled “Source Accounts” (Column P in my case). You’ll see data in a format similar to this:
1 |
22222 (Workday [source]), 22222 (IdentityNow), user.name@email.com (Okta [source]), user.name@email.com (ServiceNow [source]), user.name2@email.com (ServiceNow [source]) |
In this example, the user has multiple accounts across various sources: Workday, IdentityNow, Okta, and ServiceNow, with a duplicate ServiceNow account.
3. Count Occurrences of a Specific Source:
In another column (Column S in my case), I created a new header called “ServiceNow” and applied the following formula to count the occurrences of ServiceNow [source]:
1 |
=(LEN(P2)-LEN(SUBSTITUTE(P2, "(" & $S$1 & " [source", "")))/LEN("(" & $S$1 & " [source") |
Explanation:
-
P2 = The cell containing the “Source Accounts” values (Column P in this case).
-
$S$1 = The cell containing the source name you want to count (in this case, “ServiceNow”).
-
“(“&$S$1&” [source”: This part ensures that the target source name is preceded by an opening parenthesis “(“. This is critical because it avoids matching partial strings, like “Prod ServiceNow”. The “[source” part ensures that we’re only matching the source in the format “(SourceName [source”. The absence of the closing “]” accounts for the fact that the source may have an additional “-xxxx” at the end, such as “[source-3226]”
-
SUBSTITUTE(P2, “(” & $S$1 & ” [source”, “”): This function removes all occurrences of “(<sourcename> [source”from the original “Source Accounts” string. By comparing the length of the original string with the modified string, we can count how many times the target source name appears.
-
LEN(P2): This calculates the length of the original “Source Accounts” value in P2.
-
LEN(SUBSTITUTE(P2, “(” & $S$1 & ” [source”, “”)): This calculates the length of the modified string, where all occurrences of “(<source> [source” are removed.
-
LEN(“(” & $S$1 & ” [source”): This calculates the length of the target source string (e.g., “(ServiceNow [source”). This value is used to divide the difference in lengths, ensuring we get an accurate count of occurrences.
The result of this formula will give you the count of how many times “ServiceNow [source” appears in that line of text.
4. Filter and Analyze:
Once the formula is applied, you can filter the data to find users who have multiple accounts for the same source. For example, if the count for ServiceNow is greater than 1, you know the user has duplicate accounts for this source.
5. Expand to Other Sources:
You can easily expand this method to track multiple sources. Just add new columns for each source (e.g., “Okta”, “Workday”, etc.) and apply the formula for each one, referencing the corresponding source name in each column header.
Final Thoughts:
With this updated formula, you can efficiently track and count accounts across multiple sources, making it easier to identify users with multiple accounts for the same source. This formula works well in dynamic environments and can be adapted to other sources as needed.
I hope this helps improve your Excel workflow, and happy reporting!!!