REST API - POST calls not working from Postman

I am trying the REST API calls using the Postman API collection using my sandbox account, and am referring to the following link:

https://developer.okta.com/reference/

I am able to successfully query data, using various GETs (get app, list users, get user, etc)

However, I am not getting the expected output when I use the APIs that POSTs - create/delete/update. A few examples:

  • Assign User to a App returns 200 response, and the body contains existing users (assigned from the Dev Console) but does not contain the new user
  • Create User will return a 200 OK and list of all users, and no new user is actually created

Not sure if I am missing something, looks like a permission issue, but the response does not show any error, so its very confusing and am getting nowhere. Thanks for your time and greatly appreciate any inputs, thank you

Hi,
I am having the same issue. Did you ever find a fix?
Thanks!

Hi @hiq-mflores

Based on @vasan.jagannathan, the issue might be that the resources are paginated and, due to this, only a few list of users are displayed.

Can you please check under Response Headers tab if you have a pagination link, as mentioned here? Alternatively, you can use list users with a filter, as follows:

  'https://yourOktaOrg.okta.com/api/v1/users?filter=profile.login%20eq%20%22user@domain.com%22' \
  -H 'Accept: application/json' \
  -H 'Authorization: SSWS API_TOKEN_HERE' \
  -H 'Content-Type: application/json' 

HI,
Im having the exact same issue.
200 response, but no actual update with a POST.
@dragos to clarify- the user isnt getting assigned to the app, its not just the fact that they dont get returned in the response…
If anyone figures it out, would be most appreciated

Hi @hoshear

Can you please open a support case with us through an email to support@okta.com in order to have this further investigated by one of our Technical Support Engineers?

Thanks for the help @dragos
My issue was that the URL variable being sent wasn’t https, so it got read as a GET.
After adding that to the request it worked perfectly!

1 Like