Hi Mukesh,
From ISAM 9.0.7 you can see TOTP and HOTP enrollment status via SCIM:
GET /scim/Me or /scim/Users/<scimUserID>
{
"meta": {
"location": "https://localhost/scim/Users/dGVzdHVzZXI",
"resourceType": "User"
},
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:isam:1.0:OTP",
],
"id": "dGVzdHVzZXI",
"userName": "testuser",
"name": {
"givenName": null,
"familyName": "user"
},
"urn:ietf:params:scim:schemas:extension:isam:1.0:OTP": {
"totpEnrolled": true,"hotpEnrolled": true
}
...
}
------------------------------
Jasmine
------------------------------
Original Message:
Sent: Thu October 29, 2020 02:55 AM
From: Mukesh Bhati
Subject: ISAM - How to get the registered device for user with REST API call
Hello All,
For one of our customer, we are creating SPA(Single Paged Application) which will handle all scenarios like Login, Forgot Password, Change Password, Unlock Me, and Dashboard after login to access ISAM integrated applications(with SSO).
For each scenario, we have created a custom infoMap. These InfoMaps are getting invoked from SPA with REST API calls. Additionally, We are using TOTP as a second factor for authentication.
With the below rest endpoint, we can get the QR code for a logged-in user which can be used with any authenticator. https://hostname/mga/sps/mga/user/mgmt/otp/qr/{otpType} Using this code, registered the user with IBM Verify Mobile Application successfully.
In the case of Forgot Password, We are asking for a username and then redirecting user to the TOTP page. The challenge that we are currently facing is to ensure whether the user already has the device registered or not. If no device registered then we wanted to show an error page instead of the TOTP page.
But when using https://hostname/mga/sps/mga/user/mgmt/device endpoint to get the registered device, it gives me an empty result.
Is there any specific API that we can use?
Can someone help me on this?
------------------------------
Mukesh
------------------------------