
MichaelT.10726 (Customer) asked a question.

We use cookies to provide the best website experience and to help understand marketing efforts. We may also share data with ad partners to reach potential customers across the web. To learn more, visit our Privacy Policy. Click here for Your Privacy Choices. You may also opt out of this sharing by signaling your preference via GPC, applicable only to the browser signaling the opt-out.
More information
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Select All

We use cookies to provide the best website experience and to help understand marketing efforts. We may also share data with ad partners to reach potential customers across the web. To learn more, visit our Privacy Policy. Click here for Your Privacy Choices. You may also opt out of this sharing by signaling your preference via GPC, applicable only to the browser signaling the opt-out.
More information
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Select All
May Okta Community Buzz
Stay ahead of the curve with Okta for AI Agents, new Okta Learning live sessions and labs, shout-outs, and top trending topics—all aimed at enriching your Okta journey.
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
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
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 ?
Hi Darren,
Thanks for posting your code. Also, check out my PowerShell module
https://github.com/gabrielsroka/OktaAPI.psm1
And, if you want to export users directly from the browser, check out:
https://gabrielsroka.github.io/rockstar/
Gabriel
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.
Rockstar Chrome extension to the rescue.
https://chrome.google.com/webstore/detail/rockstar/chjepkekmhealpjipcggnfepkkfeimbd
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 .