Skip to content

List all grants for a client

Request

CORS
OAuth 2.0 scope:
  • okta.users.read

Lists all grants for a specified user and client

Path
userIdstringrequired

ID of an existing Okta user

Example:00ub0oNGTSWTBKOLGLNR
clientIdstringrequired

client_id of the app

Example:52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD
Query
expandstring

Valid value: scope. If specified, scope details are included in the _embedded attribute.

afterstring

The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination.

limitinteger, (int32), [ 1 .. 200 ]

Specifies the number of tokens to return

Default:20
curl -i -X GET \
  'https://subdomain.okta.com/api/v1/users/00ub0oNGTSWTBKOLGLNR/clients/52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD/grants?expand=string&after=string&limit=20'

Responses

Success

Bodyapplication/json
Array [
clientIdstringread-only

Client ID of the app integration

Example:"oag3ih1zrm1cBFOiq0h6"
createdstring, (date-time)(createdProperty)read-only

Timestamp when the object was created

Example:"2017-03-28T01:11:10.000Z"
createdByobject(OAuth2Actor)read-only

User that created the object

idstringread-only

ID of the Grant object

Example:"oag3ih1zrm1cBFOiq0h6"
issuerstringrequired

The issuer of your org authorization server. This is typically your Okta domain.

Example:"https://my_test_okta_org.oktapreview.com"
lastUpdatedstring, (date-time)(lastUpdatedProperty)read-only

Timestamp when the object was last updated

scopeIdstringrequired

The name of the Okta scope for which consent is granted

Example:"okta.users.read"
sourcestring(OAuth2ScopeConsentGrantSource)read-only

User type source that granted consent

Enum:"ADMIN""END_USER"
Example:"ADMIN"
statusstring(GrantOrTokenStatus)read-only

Status

Enum:"ACTIVE""REVOKED"
Example:"ACTIVE"
userIdstringread-only

User ID that granted consent (if source is END_USER)

Example:"00u5t60iloOHN9pBi0h7"
_embeddedobjectread-only

Embedded resources related to the Grant

]
Response
[ { "clientId": "oag3ih1zrm1cBFOiq0h6", "created": "2017-03-28T01:11:10.000Z", "createdBy": { … }, "id": "oag3ih1zrm1cBFOiq0h6", "issuer": "https://my_test_okta_org.oktapreview.com", "lastUpdated": "2019-08-24T14:15:22Z", "scopeId": "okta.users.read", "source": "ADMIN", "status": "ACTIVE", "userId": "00u5t60iloOHN9pBi0h7", "_embedded": { … }, "_links": { … } } ]