...
It is possible to handle creation and management of new users and the invitation process using CustomerID REST APIs. Typically a target application includes the relevant calls within the target application user interface. See Complex invitation form example using CustomerID API for an example.
Introduction to Pending User concept
When populating a new system with users from an existing list, such as an excel spreadsheet or CSV file, there are two different techniques:
The API call MOD009 Create User will create a user account that is ready to use. This is usually used when all of the information about a user is already known, including the password. It assumes that the user has somehow already given consent for having an account created (e.g. based on an existing contract or based on a third-party user interface shown before invoking this command)
Roles can be assigned to user immediately after creation.
...
See MOD026 Create Pending User API call.
A call to either command will be required for each new user to be added.
Create user invitation
Use operation MOD026 (Create Pending User):
...
Depending on your use case, you might want to save the resulting CustomerID internal user ID (762983ae-ead7-4e3a-9281-a21898dafd4c above) to the user profile of your application. It is not straightforward to fetch the invited user e.g. by using the email address.
Query/modify invited user
If you have stored the CID user ID, you can simply use the operation REQ002 (Query User) to get the user attributes. Status "Pending" indicates that the user has not yet used the registration link in the invitation email.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Users xmlns="http://schema.ubisecure.com/customerid/api" inResponseTo="/2.0/users/83feff21-c9fa-44f5-9421-be7d4fe7c23b" method="PUT"> <Id>83feff21-c9fa-44f5-9421-be7d4fe7c23b</Id> </Users> |
Resend a user invitation
There is no direct way to generate a new invitation message if for example the invitee has lost the original message or the email for some reason couldn't be delivered. CustomerID will automatically send the invitation link again within reminder messages according to the configuration. If the invitation explicitely must be sent again, you can delete the invited pending user (example follows later in this article) and generate a new invitation by using the operation MOD026 (Create pending user).
...
Code Block | ||||
---|---|---|---|---|
| ||||
<pendingUser> <userid>762983ae-ead7-4e3a-9281-a21898dafd4c</userid> <pendinguserid>9b9ae8cf-6e3a-4d98-9b8d-7649387340f3</pendinguserid> <registrationwf>roleinvite</registrationwf> </pendingUser> |
List all user invitations
Use the operation REQ013 (List Registrations) to list all pending user invitations:
...
You can then use REQ002 (Query User) to get attributes of each pending user.
Delete user invitation
If you need to delete an invitation completely, use MOD010 (Delete User):
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Users xmlns="http://schema.ubisecure.com/customerid/api" inResponseTo="/2.0/users/762983ae-ead7-4e3a-9281-a21898dafd4c" method="DELETE"> <Id>762983ae-ead7-4e3a-9281-a21898dafd4c</Id> </Users> |
Summary
Using the above APIs it is possible to implement creation and management of new users and the invitation process. Typically a target application includes the relevant calls within the target application user interface. See Complex invitation form example using CustomerID API for an example.
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...