---
get:
  summary: List Users in User Group

  tags:
    - User Group

  description: |
    > Example of a list of the users in a User Group:

    ```json
    [
      {
        "id": "1",
        "fstname": "Arthur",
        "sndname": "Dent",
        "email": "arthur.dent@scrive.com",
        "twofactor_active": false,
        "twofactor_is_mandatory": false,
        "personalnumber": "197910124242",
        "phone": "+444242424242",
        "companyadmin": true,
        "companyposition": "Hitchhiker",
        "lang": "en"
      }
    ]
    ```

    This endpoint is used to list Users who are members of that User Group.

    Note that this will only display Users that are in that User Group and will
    not show the Users who are members of any descendent User Groups.

  parameters:
    - name: user_group_id
      in: path
      type: integer
      description: The ID of the User Group whose users you wish to view
      required: true

  responses:
    200:
      description: List of Users in the User Group
      type: array
      items:
        $ref: ../../scrive_api.yaml#/definitions/User
    403:
      description: |
        Insufficient Permissions error (this means that either no User Group
        exists with this ID or that you do not have permission to view it)
