¶ Operate internal resources of Authoring
Authing identity automation integrates all open APIs of Authing (opens new window)For example, interfaces such as managing users, managing organizational structures, managing groups, managing roles, managing applications, etc., this means that you can automate the management of all resources within Authing. The implementation includes but is not limited to the following functions:
- Automatically disable users who have not logged in for a period of time.
- Label users based on email suffix and age.
- Automatically label and add default groups to users after creation.
- ...
¶ Select Action
You should be able to notice that all actions under the Authoring application node correspond one-to-one with the interfaces of the Authoring V3 API. It is recommended that you first use the Authing API Explorer (opens new window)Quickly understand the use of the Authoring API.
You can see the corresponding usage documentation for each action in the details of the Authing application, and the corresponding interface address in the Authing API Explorer will be included in the document description.
¶ Quick example
Next, we will demonstrate a specific usage scenario: pull the Authoring user list and label the user based on their email suffix.
Here we need to use two interfaces under the Authing application:
At the same time, it is necessary to convert the return result of the user list pulling interface into the format of the batch modification user information interface, and calculate the email suffix for each user, so a data conversion node is also needed.
¶ Create user extension fields to store labels
Firstly, we need to add a user extension field in the Settings Field Management page of the console. Here, we set a string type extension field - email_domain.
¶ Write a node to pull the Authoring user list
Create an Authoring node to retrieve/search user lists, and configure them separately:
-AdvancedFilter: Advanced search criteria, where we set the condition that the email is not empty:
[
{
"field": "email",
"operator": "NOT_NULL"
}
]
- Options: optional. Here, we set the pagination condition to the first page and pull 50 entries. You may ask, what if I need to pull all users? We have provided you with a loop node. Please refer to the documentation for details:Recurrent execution
{
"pagination": {
"page": 1,
"limit": 50
}
}
After writing, you can click on execute to see the effect.
¶ Add a data conversion node for calculating user email suffixes
You can view batch modification of user information in the Authoring API Explorer
We have configured two conversion rules here:
- Field mapping rule userId ->usrerId
- Expression rule: Convert
$item.email.split("@")[1]
to a customData. email_domain field (a nested structure)
¶ Write batch modification of user information nodes
In the previous step, we have already converted the data into the format required for batch modification of user information nodes. Now, we only need to assemble the data:
Finally, click execute and you can see that the user's extension fields have been updated correctly: