This post will focus on the creation of the users and the users groups.
We will see how the module will help you to create users and users groups with some helper functions.
Creating Users and User Groups
Users and User Groups Requirement
In order to create new users, you will need to gather the required information. The required information for the users are :
- First name
- Last name
- Country code
On top of that information, you need to know which type of account you are going to create for your users.
The current module support 2 types of account :
- Adobe ID : Your company doesn’t own the accounts, they are connected to an adobe id. You attach these accounts to your company profile.
- Enterprise ID : Your company owns the the accounts. You would need to set the domain attach to your company to realize that. More information here :
https://helpx.adobe.com/enterprise/kb/enterprise-id-faq.html - Federated ID : not supported yet. Feel free to add this functionality in the module.
For creating group, you will require some information as well. Due to the fact that product profiles are not manageable from the API, it is restricted to only user group creation.
The required information for the creation of the group:
- Group name
- Group description
Fortunately, I have written method to generate a template for you.
createTemplates
This method will generate a file that gives you a template for your user and your groups.
The arguments :
- fileType : REQUIRED. 2 possible values of the is parameter :
- ‘csv’ : will generate 2 csv file for user and group information
- ‘xslx’ : will generate 1 Excel file with 2 sheets for the user and group information.
- verbose : OPTIONAL. Default False. If set to True, print information.
Those files will help you create the different users information you would like to set, or the different groups. You can import those file by using pandas and create a data frame. This is important because the module is taking dataframe or series as input to create those users and user groups.
create_users
This method is giving you the possibility to import the user information you have set in your data frame (through the template, or not) into your company profile and create these users.
At this point you will either create accounts (enterprise ID) or link your company to their adobe ID (adobeid).
The arguments of this method are :
- usersInformation : REQUIRED : This will be the dataframe with your user information.
- accessType : OPTIONAL : You can define the type of account you want to create. By default the value will be adobe account, but 2 possibles values :
- ‘adobe’ : will generate adobe accounts.
- ‘enterprise’ : will generate enterprise accounts.
- verbose : OPTIONAL. Default False. If set to True, print information.
This method returns the response from the Adobe server, if the requests have been successful or not.
create_usersGroups
This method gives you opportunity to create user groups.
You would need to prepare a data frame and I would recommend you to follow the template that can be created from the createTemplate method.
The arguments of this method are :
- groupsInformation : REQUIRED : Dataframe of all the groups that will be created.
- verbose : OPTIONAL. Default False. If set to True, print information.
This method returns the response from the Adobe server, if the requests have been successful or not.
Removing Users and User Groups
The module helps you to also remove the users and / or the user groups from your organization.
The module provides 2 different methods to realize this.
remove_users
This method will send the information to remove the users from the organization.
The arguments are :
- usersInformation : REQUIRED : Dataframe of all the users that need to be remove from the org. If the users are adobe accounts, you cannot delete the access.
- verbose : OPTIONAL : if information of the different request status to be print
It returns if the request has been successful or not on this deletion.
remove_usersGroups
This method will send the information to remove the user groups from the organization.
The arguments are :
- groupsInformation: REQUIRED : Dataframe of all the users that need to be remove from the org. If the users are adobe accounts, you cannot delete the access.
- verbose : OPTIONAL : if information of the different request status to be print
It returns if the request has been successful or not on this deletion.
Product Profiles
At the moment of this creation, the API doesn’t provide access to manage the product profile themselves. Therefore this module doesn’t provide this functionality neither.
I have a full article on the subject, on why you should create product profile and assign them to user groups to manage the access rights.
You can check it out here.
I hope that this article explains you a bit more on how to use the different methods of this module.
On this series, you may want to check this as well :
Articles | Comments |
Adobe IO : JWT authentication | How to create JWT authentication with OpenSSL and python |
Adobe IO : User Management : Introduction | What you need to know about this module |
Adobe IO : User Management : Configuration | What do you need to have for this module. |
Adobe IO : User Management : retrieve information | How to retrieve the information currently held on your adobe admin console. |
Adobe IO : User Management : Create and Remove Users and Users Groups | How to create and remove users and user groups. |
Adobe IO : User Management : User Group Class | Discover how you can handle the different group with the python class available |
Adobe IO : User Management : Other functionnalities | Other functionalities that are included in this python module and that can be quite usefule |