
jp7ry (jp7ry) asked a question.
Hello,
I am trying to create an Access Request via API and include requestor attributes in the payload. One of the requestor attribute firlds is a drop down configured as a config list (it is a list of Okta groups).
When I pass the group name (e.g., “Group Abc”) in the payload for the Access Request Create API, I get an error stating that the “Group Abc is not an option defined in the select field.” I also tried passing the Okta Group ID, but I encounter the same error.
Interestingly, the same group name works when using the Access Request UI Console for creating the same Access request, but not via the API.
Does anyone know what exact value should be passed to successfully create the request through the API?
I’m stuck—any suggestions would be greatly appreciated!
Thanks

I've not used this API but I've used this technique when trying to figure out other APIs. The idea is that since you can manually create the Access Request you want via the UI Console you could create it that way and then make an API call to "Retrieve a request" and use that to figure out how to make construct the API call to "Create a request".
Retrieve a request:
https://developer.okta.com/docs/api/iga/openapi/governance.requests.admin.v1/tag/Requests/#tag/Requests/operation/getRequest
Create a request:
https://developer.okta.com/docs/api/iga/openapi/governance.requests.admin.v1/tag/Requests/#tag/Requests/operation/createRequest
Thank you for the suggestion! To better understand the JSON structure and exact values used in a successfully submitted request (via the UI), I tried retrieving an existing request using the API. However, it shows the exact same values I am already passing in my Create Request API, yet I still encounter an error.
Interestingly, for a requester field that is of Select type with a static options list (instead of a configuration list), I can successfully pass the value without any errors.
Based on the following documentation v1 & v2 of this API are currently still in "BETA" so perhaps the use of a configuration list is not currently supported or you found a bug.
https://developer.okta.com/docs/api/iga/openapi/governance.requests.admin.v1/tag/Requests/#tag/Requests/operation/createRequest
https://developer.okta.com/docs/api/iga/openapi/governance.requests.admin.v2/tag/Requests/#tag/Requests/operation/createRequestV2
I would suggest you post your question to the Okta Developer forum to see if someone there might have experience with that API otherwise I think you are at the point where you could open an Okta Support Case since you have an error and can show them how it works fine with static options list but not with configuration list.
https://devforum.okta.com/
https://support.okta.com/help/s/opencase