- Management APIs
- Access Requests - V2
- Create a request
- okta.accessRequests.request.manage
- ACCESS_REQUESTS_ADMIN
Creates a resource access request for a given user.
Use this operation to create access requests managed by access request conditions.
If requestedBy and requestedFor aren't the same, then you must also enable the requestOnBehalfOfSettings parameter in the access request settings. See Update the resource request settings.
Include the following information in the payload:
- The Okta user ID for the user who requires access. Add the user ID in the
requestedFor.externalIdparameter. - The catalog entry ID of the resource required by the user. Add the catalog ID in the
requested.entryIdparameter. - If the request conditions include requester input fields, add field information in the
requesterFieldValuesarray. See Retrieve the request fields. - Optional: The user ID of the person submitting the request. By default, this value is the admin user ID requesting this operation and doesn't need to be provided. However, to add a different Okta user ID for the request, include the
requestedBy.externalIdparameter in the request body.
The writable attributes of a request
The requester input fields required by the approval system.
Note: The fields required are determined by the approval system.
For the Okta approval system, the required fields are defined in the approval sequence. Ensure that the requester input fields match up with this definition to avoid request approval flow failure.
For external approval systems, the requester input fields are for recording purposes only and do not affect the approval process.
curl -i -X POST \
https://okta-subdomain.pixtulate.com/governance/api/v2/requests \
-H 'Content-Type: application/json' \
-d '{
"requested": {
"type": "CATALOG_ENTRY",
"entryId": "cen3qpimoKc7wCPyx8g6"
},
"requestedFor": {
"type": "OKTA_USER",
"externalId": "00ub0oNGTSWTBKOLGLNR"
}
}'Response when create request is accepted
The id of the Okta user who created the resource
The ISO 8601 formatted date and time when the resource was created
The ISO 8601 formatted date and time when the object was last updated
The id of the Okta user who last updated the object
The date the request was resolved. The property may transition from having a value to null if the request is reopened.
The grant status of the request
The date the approved access was granted. Only set if request.status is APPROVED.
The revocation status of the request
The date the granted access was revoked. Only set if request.grantStatus is GRANTED and request.revocationStatus is REVOKED.
How long the requester retains access after their request is approved and fulfilled.
Specified in ISO 8601 duration format.
Only single time unit ISO 8601 duration formats (D, H, M) are supported for units (days, hours, minutes).
| Unit | Example |
|---|---|
| D, days | P40D |
| H, hours | PT65H |
| M, minutes | PT90M |
Note: Mixes of units, as well as month/year/week designations, aren't supported. For example,
P40DT65H,P40M,P1W, andP1Yaren't supported.
The date the granted access is scheduled for recovation. Only set if request.accessDuration exists, and request.grantStatus is GRANTED.
The requester input fields required by the approval system.
Note: The fields required are determined by the approval system.
For the Okta approval system, the required fields are defined in the approval sequence. Ensure that the requester input fields match up with this definition to avoid request approval flow failure.
For external approval systems, the requester input fields are for recording purposes only and do not affect the approval process.
- When requesting for authenticated user |tooltip| Request access for authenticated user by omitting `requesterUserIds`
- When requesting access with client credentials authentication |tooltip| Request access using client credential authentication and omitting the `requestedBy` field in the request body.
- When entry has no fields, empty array provided |tooltip| When entry has no fields, empty array provided
- When entry has one TEXT field |tooltip| When entry has one TEXT field
- When entry has one SELECT field |tooltip| When entry has one SELECT field
- When entry has a MULTISELECT field |tooltip| When entry has a MULTISELECT field
- When entry has a ISO_DATE field |tooltip| When entry has a ISO_DATE field
- When entry has all field types |tooltip| When entry has all field types
- When existing request has risk assessment
{ "id": "req42kjDgk1EubTwo0g4", "created": "2019-08-24T14:15:22Z", "createdBy": "00ub0oNGTSWTBKOLGLNR", "lastUpdated": "2022-05-05T14:15:22Z", "lastUpdatedBy": "00ub0oNGTSWTBKOLGLNR", "status": "SUBMITTED", "requestedBy": { "type": "OKTA_USER", "externalId": "00ub0oNGTSWTBKOLGLNR" }, "requestedFor": { "type": "OKTA_USER", "externalId": "00ub0oNGTSWTBKOLGLNR" }, "requested": { "entryId": "cenb0oADRXTBKOLGLNR", "resourceId": "0oafxqCAJWWGELFTYASJ", "resourceType": "APPLICATION", "accessScopeType": "APPLICATION", "accessScopeId": "0oafxqCAJWWGELFTYASJ" }, "_links": { "catalogEntry": { … }, "self": { … } } }