It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda CloudGen Access

Manage User Enrollments

  • Last updated on

Back to CloudGen Access CLI Client Usage Examples

Usage:

  access-cli users enrollment [command]

Available Commands:

  • generate    Generate user enrollment link
  • get              Get user enrollment link
  • change       Change user enrollment link slots
  • revoke        Revoke user enrollment link
  • email          Send email with user enrollment link

Flags:

  -h, --help   help for enrollment

Global Flags:

      --auth string     credentials file (default is /Users/dbuhr/

Library/Application Support/barracuda/access-cli/auth.yaml)

      --config string   config file (default is /Users/dbuhr/

Library/Application Support/barracuda/access-cli/config.yaml)

  -v, --verbose int     verbose output level, higher levels are more verbose

Use    access-cli users enrollment [command] --help   for more information about a command.


1. Generate enrollment slots for different types of device classification 

This form of the   access-cli users enrollment  command generates new enrollment slots for given users with provided --classification and --slots.

access-cli users enrollment generate [userID,...]

Generate new enrollment slots for User ID 120813 with device classification of Managed and 12 slots. The url is the enrollment_url that a user would have to enter in his/her CloudGen Access agent prompt to enroll the device. This enrollment_url / token is sent via email or copied from the dashboard by the admin to pass on to the user.

access-cli users enrollment generate 120813 --slots 12 --classification 'managed' -o json-pretty
[
  {
    "count": 12,
    "device_classification": "managed",
    "expiration": "2023-12-13T02:25:37.872Z",
    "url": "https://stg.access.yourCompany.com/enroll?endpoint=https%3A%2F%2Fapi.stg.access.yourCompany.com\u0026token=87b48869-906a-45cc-a23c-75b516798463"
  }]
] 

For multiple users, the command would look something like this:

access-cli users enrollment generate 120813 121019 1302 --slots 3 --classification 'personal'

In the example above, 3 slots are created for 3 User IDs (each), with device classification of Personal.

2. Get enrollments

This form of the  access-cli users enrollment  command retrieves all enrollments for each requested user:

access-cli users enrollment get [userID,...]


Example: Get enrollment info. for User ID's 121019 and 120813

access-cli users enrollment get 121019 120813 
[
  {
   "id": 121019,
   "managed": "https://stg.access.barracuda.com/enroll?endpoint=https%3A%2F%2Fapi.stg.access.barracuda.com\u0026token=4f787d29-8df7-48a8-ac9d-134621accf53",
   "personal": "https://stg.access.barracuda.com/enroll?endpoint=https%3A%2F%2Fapi.stg.access.barracuda.com\u0026token=db53c1bf-3f24-4d7a-a022-ffd5e6967849",
   "supervised": "https://stg.access.barracuda.com/enroll?endpoint=https%3A%2F%2Fapi.stg.access.barracuda.com\u0026token=d58e24f1-368f-4732-a70d-58ef358b906f"
  },
  {
   "id": 120813,
   "managed": "https://stg.access.barracuda.com/enroll?endpoint=https%3A%2F%2Fapi.stg.access.barracuda.com\u0026token=68e3c439-3a3c-4e77-bdaf-1d6da9b446c1",
   "supervised": "https://stg.access.barracuda.com/enroll?endpoint=https%3A%2F%2Fapi.stg.access.barracuda.com\u0026token=ee693160-df12-4b69-baa4-cb3169f320fd"
}

3. Change enrollments

This form of the  access-cli users enrollment  command changes the number of slots for given User IDs for the specified classification using the flags --classification and --slots

Example: Change the number of managed slots for userID 120813 to 2 slots:

access-cli users enrollment change 120813 --slots 2 --classification "managed"

Example output:

+--------+-------+----------------+--------------------------+---------------------------------------------------~
|     ID | Slots | Classification | Expiration               | URL                                                          
 --------+-------+----------------+--------------------------+---------------------------------------------------~
| 120813 |   2   | managed        | 2023-12-13T02:25:53.207Z | https://stg.access.yourcompany.com/enroll?endpoint=https%3A%2F%2Fapi.stg.access.yourcompany. ~
+--------+-------+----------------+--------------------------+---------------------------------------------------~
(1 record)

4. Email Users

This form of the  access-cli users enrollment  command sends out enrollment emails for given users with the specified device classification. If no --classification flag is provided, the command sends email to Supervised user devices. If the --classification and --slots flags are provided but the classification does not exist, the command creates a new classification enrollment with the specified number of slots for the User ID.

access-cli users enrollment email [userID,...]

This example sends an enrollment email to User ID 121019 with personal device classifications.

access-cli users enrollment email 121019 --classification 'personal' --slots 25

Example output:

+--------+---------+
|     ID | Result  |
+--------+---------+
| 121019 | success |
+--------+---------+
(1 record)


5. Revoke slots

This form of the  access-cli users enrollment  command revokes the enrollment link for specified user(s) and classification.

access-cli users enrollment revoke [userID,...]


access-cli users enrollment revoke 120813 --classification 'personal'              
+--------+---------+
|     ID | Result  |
+--------+---------+
| 120813 | success |
+--------+---------+
(1 record)