How to download 25K users data for AD accounts

How we can download 25K account of AD through. I tried through UI but the file is coming as blank as the data is huge.
I have tried to API as well but the limit seems to be 250, do I have to do pagination until I don’t have any data.

Please let me know if anyone has come through this kind of issue and what could be solution.

Hi @Aakansha_Sahu,

Take a look at the below post :

You can also run PowerShell queries from the IQServer to get the account details directly from AD by making use of the same filters used in the AD connector (recommended only if you are just trying to get the AD account details and not trying to validate something in IDN) :

Below is a sample PS script :

Import-Module ActiveDirectory
$ExportPath = 'C:\userlist.csv'
Get-ADUser -SearchBase 'DC=ABC,DC=XYZ,DC=com' -Filter {(objectClass -eq 'user') -and (sAMAccountName '*')} -properties *| Select-object DistinguishedName,Name,UserPrincipalName | Export-Csv -NoType $ExportPath

You can also run a search query to get all users in the AD source

@accounts(source.name:ActiveDirectory)

And then try an Excel vlookup on the previous data to map Accounts to Identities.

1 Like

You can use the SailPoint PowerShell SDK to accomplish this. You will need to update the filter with your source id and the limit on the Invoke-Paginate function to the total number of accounts you want to pull.

$Parameters = @{
    "Filters" = 'sourceId eq "2c9180877de347a1017e21d505831cd4"'
}
$Accounts = Invoke-Paginate -Function "Get-Accounts" -Increment 250 -Limit 25000 -InitialOffset 0 -Parameters $Parameters

$Accounts | ConvertTo-Json -depth 100 | Out-File "accounts.json"

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.