<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y000071XOmvSAGOkta Classic EngineAdministrationAnswered2024-04-16T11:35:30.000Z2019-11-12T19:49:00.000Z2019-11-27T21:03:45.000Z
  • 0l4ye (0l4ye)

    For more advanced reports, we use https://github.com/gabrielsroka/OktaAPI.psm1

    See the CallOktaAPI.ps1 for examples

    But for illustration we use the script below to export the groups.

    (and we have scheduled this kind of scripts everyday to create a "snapshot" of groups, accounts and applications)

     

    #Install-Module OktaAPI # [1]

    #Install-Script CallOktaAPI # [2]

    Connect-Okta -Token "xxxxxxxxx" "https://xxxxxx.okta.com"

     

    #Export all users to a csv-file

     $totalGroups = 0

      $exportedGroups= @()

      # for more filters, see https://developer.okta.com/docs/api/resources/users#list-users-with-a-filter

      $exportFile = "C:/Tasks/Exports/$((Get-Date).ToString('yyyyMMddHHmm'))-OktaGroups.csv"

      do {

        $page = Get-OktaGroup $params

        $exportedGroups += $page | Select-Object *, @{n='name';e={$_.profile.name}}, @{n='googleExternalId';e={$_.profile.googleExternalId}}, @{n='samAccountName';e={$_.profile.samAccountName}},@{n='groupType';e={$_.profile.groupType}},@{n='dn';e={$_.profile.dn}},@{n='objectSid';e={$_.profile.objectSid}}

        $params = @{url = $page.nextUrl}

      } while ($page.nextUrl)

    $exportedGroups | Export-Csv $exportFile -notype

    Expand Post
    Selected as Best
  • Without knowing the level of detail you need you can try the Okta usage report.

     

    Reports > Click first report 'Okta Usage'

     

    Here you can specify the range and scope to a specific group or leave it blank and get all users in the tenant. This should at least give you all your users and their statuses.

    Expand Post
  • 0l4ye (0l4ye)

    For more advanced reports, we use https://github.com/gabrielsroka/OktaAPI.psm1

    See the CallOktaAPI.ps1 for examples

    But for illustration we use the script below to export the groups.

    (and we have scheduled this kind of scripts everyday to create a "snapshot" of groups, accounts and applications)

     

    #Install-Module OktaAPI # [1]

    #Install-Script CallOktaAPI # [2]

    Connect-Okta -Token "xxxxxxxxx" "https://xxxxxx.okta.com"

     

    #Export all users to a csv-file

     $totalGroups = 0

      $exportedGroups= @()

      # for more filters, see https://developer.okta.com/docs/api/resources/users#list-users-with-a-filter

      $exportFile = "C:/Tasks/Exports/$((Get-Date).ToString('yyyyMMddHHmm'))-OktaGroups.csv"

      do {

        $page = Get-OktaGroup $params

        $exportedGroups += $page | Select-Object *, @{n='name';e={$_.profile.name}}, @{n='googleExternalId';e={$_.profile.googleExternalId}}, @{n='samAccountName';e={$_.profile.samAccountName}},@{n='groupType';e={$_.profile.groupType}},@{n='dn';e={$_.profile.dn}},@{n='objectSid';e={$_.profile.objectSid}}

        $params = @{url = $page.nextUrl}

      } while ($page.nextUrl)

    $exportedGroups | Export-Csv $exportFile -notype

    Expand Post
    Selected as Best
This question is closed.
Loading
how do I pull a report on all my users and groups