Bulk adding users to a room

It is possible to add users into a room in bulk using a script. The following script will automate this process via a CSV of userIDs plus some configuration of the pod, authentication keys/certificates, Service Account and a RoomID.

 

Note: This script uses Python, please install this before attempting to run the script

 

Note: This is an unsupported script which has been developed for users as a guideline to adapt accordingly

 

1. Install the Python SDK file found here 

 

Note: This file has already been added to this script's Git Repository which is linked at the end of this article

 

2. To install it, the user will need to save the file as requirements.txt and use the pip command:

 

mceclip0.png

Figure 1 Pip Command

 

3. Then the user will need to install the Python SDK:

 

mceclip1.png

Figure 2 Install Command

 

4. The user is required to have the following items which are passed through to the script to ensure it is executed successfully:

  • RSA Key pair

  • config.json

  • userIDs.csv

5. The RSA Key pair must be obtained from your internal IT team as Symphony do not administer your pod

 

6. The config.json is required in the following format

{
"sessionAuthHost": "companyabc.symphony.com",
"sessionAuthPort": 443,
"keyAuthHost": "companyabc.symphony.com",
"keyAuthPort": 443,
"podHost": "companyabc.symphony.com",
"podPort": 443,
"agentHost": "companyabc.symphony.com",
"agentPort": 443,
"botRSAPath": "PATH",
"botRSAName": "BOT-RSA-NAME",
"botCertPassword": "BOT-PASSWORD",
"botUsername": "BOT-USERNAME",
"botEmailAddress": "BOT-EMAIL",
"appCertPath": "",
"appCertName": "",
"appCertPassword": "",
"proxyURL": "",
"proxyUsername": "",
"proxyPassword": "",
"authTokenRefreshPeriod": "30",
"truststorePath": ""
}

Note: Where companyabc is the name of your pod

 

7. For certificate-based authentication, the user must swap botRSAPath and botRSAName with botCertPath and botCertName

 

Note: The user may also need to swap companyabc.symphony.com to companyabc-api.symphony.com for SessionAuthHost and KeyAuthHost

 

Note: The user may also need to amend the port numbers to reflect their pod configuration

 

8. For the userID.csv, the file must be formatted in the following way with the userIDs of each account to be added to the room:

 

mceclip2.png

Figure 3 User IDs

 

9. To execute the script, navigate to the directory where the above files have been saved and run the following command:

 

python add-users-to-room.py --auth "rsa" --config "/path/to/config.json" --csv "/path/to/userIDs.csv" --stream "{streamID}"


Note:
The full script can be viewed and downloaded from repository located here