Get the OATH Counter
This section describes how to retrieve the CRED_INFO_EVENT_COUNTER attribute. It is returned in GET Credential attributes (if the credential type is compatible).
[GET] /scim/{tenant}/v2/Credential/{id}
To get the credentialId, you can call GET Device. The response contains a list of credentials associated with the device.
[GET] /scim/{tenant}/v2/Device/{id}
SEARCH Device, SEARCH User and GET User can be used to get the deviceId:
-
[POST] /scim/{tenant}/v2/Device/.search
-
[POST] /scim/{tenant}/v2/User/.search
-
[GET] /scim/{tenant}/v2/User/{id}
The following sections provide examples of the requests for the different steps.
Search User to Get the deviceId
Sample Request
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:SearchRequest"],
"filter": "externalId eq myUser"
}
Sample Response
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 1,
"resources": [ {
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:hid:scim:api:idp:2.0:UserDevice",
"urn:hid:scim:api:idp:2.0:UserAttribute",
"urn:hid:scim:api:idp:2.0:UserAuthenticator"
],
"id": "11146",
"externalId": "myUser",
"meta": {
"resourceType": "User",
"created": "2017-09-11T22:00:00Z",
"location": "https://[base-server-url]/v2/Users/11146",
"version": "1"
},
"userName": "myUser",
"active": true,
"groups": [ {
"type": "Group",
"display": "Full Time Employees",
"value": "USG_FTEMP",
"$ref": "https://[base-server-url]/v2/Groups/USG_FTEMP"
}],
"roles": [],
"urn:hid:scim:api:idp:2.0:UserAttribute": {"attributes": []},
"urn:hid:scim:api:idp:2.0:UserAuthenticator": {"authenticators": [ {
"display": "AT_EMPOTP",
"value": "11146.AT_EMPOTP",
"$ref": "https://[base-server-url]/v2/Authenticator/11146.AT_EMPOTP"
}]},
"urn:hid:scim:api:idp:2.0:UserDevice": {"devices": [ {
"display": "500",
"value": "11144",
"$ref": "https://[base-server-url]/v2/Device/11144"
}]}
}]
}
Get Device
Sample Response
{
"schemas": ["urn:hid:scim:api:idp:2.0:Device"],
"id": "11144",
"externalId": "500",
"meta": {
"resourceType": "Device",
"created": "2017-09-12T08:33:55Z",
"location": "https://[base-server-url]/v2/Device/11144",
"version": "1"
},
"type": "DT_MIN_OE",
"status": {
"status": "ACTIVE",
"active": true,
"expiryDate": "2019-09-11T22:00:00Z",
"startDate": "2017-09-11T22:00:00Z"
},
"owner": {
"type": "User",
"display": "myUser",
"value": "11146",
"$ref": "https://[base-server-url]/v2/Users/11146"
},
"children": [ {
"value": "11145",
"$ref": "https://[base-server-url]/v2/Credential/11145"
}]
}
Get Credential
Sample Response
{
"schemas": ["urn:hid:scim:api:idp:2.0:Credential"],
"id": "11145",
"externalId": "11144/500",
"meta": {
"resourceType": "Credential",
"created": "2017-09-11T22:00:00Z",
"location": "https://[base-server-url]/v2/Credential/11145",
"version": "1"
},
"type": "CT_AIOE",
"status": {
"status": "ACTIVE",
"active": true,
"expiryDate": "2019-09-11T22:00:00Z",
"startDate": "2017-09-11T22:00:00Z"
},
"attributes": [ {
"name": "CRED_INFO_EVENT_COUNTER",
"type": "string",
"value": "0",
"readOnly": false
}],
"totalUsed": "0"
}
Next step - Set the OATH Counter