<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
0D50Z00008C3jhMSAROkta Classic EngineAdministrationAnswered2025-06-14T10:29:51.000Z2017-09-15T16:02:13.000Z2020-04-23T13:44:41.000Z
Export List of users in an Okta group
I would like to export a list of users contained in one of our AD synced Okta group.

There are some missing members in the Okta group compared with our AD source group and I would like to compare to see which members are missing and figure out why.

 

Thank you for your help.

  • Pablo (Customer)

    So, I've also had this need and found a workaround, it's a bit of a hack but it works. (no API needed)

     

    - If you don't already have the 'App Access Audit' report available, call Okta and have it turned on for your Org. I'm not sure if it's EA or GA

    - Create a new hidden SAML app via the wizard (use http://okta.com or something trivial for the 'Single Sign On URL') -make sure it's hidden!

    - Go to the App -> Sign On -> Edit -> Username -> Change the username to 'email'

    - Assign the app to the 'Everyone' group or to the group you want to download (I assign it to myself and double-check that it's hidden AND the email is the username) .. this may take a few minutes to complete assignment, so I'd give it 2-5mins before running next step

    - Go to Reports -> Application Access Audit -> Current Assignments -> Find the app -> Run Report.

    - Download CSV - The email shows up as 'Application Login'

    All done, have a cookie

     

    Expand Post
  • uttha (uttha)

    Its surprising that this is not available as a report or within the UI. Having to use an API script to export users from a group is tedious. Additionally, there needs to be a way to upload users to a group via a CSV as opposed to doing it via a rule or manually.-
  • 6g7h5 (6g7h5)

    I mean if I could even get to the point of using the API would I really want to use Postman?

    Postman is owned by Okta right so there is a bit of a security concern here;

    Okta should have a documented solution here that doesnt require third party tools

  • DarrenC.08814 (Customer)

    The script below can be used to create a formatted CSV, you can obtain the group Id by using the following and searching for the group name and finding the "id" field.

    https://YOUR OKTA ORG HERE/api/v1/groups

    The OKTA fields would be something like email, firstName, lastName, jobTitle as they are named in OKTA

     

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    $org = "YOUR OKTA ORG HERE (does not require https://)"

    $api_token = "YOUR OKTA API TOKEN HERE"

    #Change the path below to suit the resulting files location

    $path = "C:\ScriptRepository\Results\OKTAGroupMembers.csv"

    $AllUsers = @()

    $Headers = @{"Authorization" = "SSWS $api_token"; "Accept" = "application/json"; "Content-Type" = "application/json"}

    $uri = "https://$org/api/v1/groups/OKTA GROUP ID HERE/users"

    do {

      $WebResponse = Invoke-WebRequest -Headers $headers -Method Get -Uri $uri

      $Links = $WebResponse.Headers.Link.Split("<").Split(">") 

      $uri = $links[3]

      $users = $webresponse | ConvertFrom-Json

      $allusers += $users

    } while ($webresponse.Headers.Link.EndsWith('rel="next"'))

    $activeUsers = $allusers | Where-Object { $_.status -ne "DEPROVISIONED" }

    $activeUsers | Select-Object -ExpandProperty profile | 

      Select-Object -Property OKTA FEILDS REQUIRED HERE SEPARATED BY A COMMA | 

      Export-Csv -Path $path -NoTypeInformation

    Expand Post
  • SlobodanA.31714 (Customer)

    Script lacks UTF-8 support for special characters, so not really usable for us. I tried different approaches.

    The problem lies in ConvertFrom-Json not really supporting UTF-8 when pulling over data.

     

    Can you help with a workaround or corrected script ?

  • OktaMFAS.93911 (Customer)

    It seems ridiculous to me that this isn't already a standard report that can be pulled or that they don't have a simple export to excel option when you're viewing all the users in a particular group.

  • SlobodanA.31714 (Customer)

    Yeah, Rockstar is great! But even with Rockstar I don't get UTF-8 conform exports. Meaning special characters are not exported like ä,ö,ß,ć and so on .

10 of 12
This question is closed.
Loading
Export List of users in an Okta group