This article describes the steps you should follow to create or delete a Flow365 user account via API.
Create a Flow365 user account
Before front-line workers can consume training, they'll need to be added or invited to Flow365. There are two flows for this:
- Create a Flow365 user account: an LMS admin creates a Flow365 user account, the account is activated straight away, and the user logs in with a link they receive via email. This way requires fewer steps from the Flow365 user.
- Invite front-line workers to Flow365: an LMS admin invites a front-line worker, the front-line worker verifies and activates their account, and then logs in.
This section describes the steps to create a Flow365 user account without invitations (the first flow) via API. You can also create a Flow365 user account in the Learn365 Admin Center.
For more information about inviting front-line workers via API (the second flow), see this article.
To create a Flow365 user account via API:
1. Go to https://api.365.systems/ and make sure you're authorized with the relevant API key.
2. In the Users section, select the POST /services/users/Users endpoint and select Try it out in the top right-hand corner.
3. In the request body, the required parameters for Flow365 user accounts are:
- title: The user's full name that will be displayed in Learn365.
- email: The user's email address must be unique, meaning it can't belong to an existing user.
- userSource: For Flow365 user accounts, the user source is AzureB2C.
-
signInType: There are two possible sign-in types:
- Email: The Flow365 user signs in with their email address.
- Phone: The Flow365 user signs in with their phone number. However, when creating a user, also enter the email address because the user receives a sign-in link via email.
-
profile: For the Phone sign-in type, in the profile object, enter the parameter:
- phone: The user's phone number must be unique, meaning it can't belong to an existing user.
The request body may look like this:
For the Email sign-in type:
{
"title": "John Doe",
"email": "jdoe@test.com",
"userSource": "AzureB2C",
"signInType": "Email"
}
For the Phone sign-in type:
{
"title": "John Doe",
"email": "jdoe@test.com",
"userSource": "AzureB2C",
"signInType": "Phone",
"profile": {
"phone": "+5555555"
}
}
4. Select Execute to run the request.
5. Go to the Response block to check the results:
- 200 code with the user's details in its body indicates a successful response.
- In case of errors, the response body contains the error object with the code and message keys explaining the issue.
The Flow365 user receives a link and, if they were created using the email address sign-in identity type, a temporary password via email.
If you created the account using the email address as a sign-in identity type, the user logs in with their email address and the temporary password. On first login, the Flow365 user needs to change their temporary password to a new one.
If you created the account using the phone number as a sign-in identity type, the user logs in with their phone number and the one-time code they receive when logging in.
After logging in, Flow365 users can access Flow365.
Delete a Flow365 user account
With the Learn365 API, you can delete a Flow365 user account if they have previously activated it. If you delete a user account, the account won’t count in the overall number of Flow365 users in your subscription. You can also delete a Flow365 user account in the Learn365 Admin Center.
To delete a Flow365 user account via API, you’ll need the user's ID. You can find this via the API by following the steps in this article.
To delete a Flow365 user account:
1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.
2. In the Users section, select the DELETE /services/users/Users/{id} endpoint and select Try it out in the top right-hand corner.
3. In the id field, enter a user ID.
4. Select Execute to run the request.
5. Go to the Response block to check the results:
- 204 code with an empty body indicates a successful response.
- In case of an error, the response body contains the error object with the code and message keys explaining the issue.
Comments
Article is closed for comments.