OKTA User API Customize with required field

Hi ,

We are using OKTA users API to get user the Information from OKTA.

The response format is mentioned below. In the response we have thumbnailPhoto which is image type and We don’t want this field in the response data. How can we avoid this?

Can we customize the response format from OKTA?

“id”: “0RR11pzjahNG4OeOe0x9”,
“status”: “ACTIVE”,
“created”: “2015-07-09T21:08:03.000Z”,
“activated”: “2015-07-09T21:08:04.000Z”,
“statusChanged”: “2015-07-09T21:08:04.000Z”,
“lastLogin”: “2018-08-06T11:15:54.000Z”,
“lastUpdated”: “2018-07-23T16:15:37.000Z”,
“passwordChanged”: null,
“profile”: {
“firstName”: “Test”,
“lastName”: “Seee”,
“primaryPhone”: “+1.255555”,
“hireDate”: “4/17/2000”,
“Delivery_Office”: “Test RRville”,
“mobilePhone”: " “,

URl that we use: https://Test.okta.com/api/v1/users


No, you can’t customize the response from /api/v1/users. Any custom profile fields that are defined on the Okta profile will be returned.

I am curious why you need to remove Location or thumbnailPhoto. Are you concerned about the size of the response payload? Is some of the data private information?

Thanks for the quick response.

The thumbnailPhoto is large size and we don’t need to use this field. Because of the size of image it takes time to get response from OKTA.

Is there a way to handle this?

I’d recommend moving data like photos to a proper storage service like S3, and only saving the URL on the Okta profile. That will be cleaner and easier to manage in the long run.