> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get organization users groups report

> Returns a report of all users in your organization with their group memberships. This endpoint returns all users without pagination and always includes group information. The report can be retrieved in JSON or CSV format by sending specific content-type headers.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/managed-accounts.yml get /organizations/users/users_groups_report
openapi: 3.1.0
info:
  title: Telnyx Managed Accounts API
  version: 2.0.0
  description: API for Managed accounts.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /organizations/users/users_groups_report:
    get:
      tags:
        - Organization Users
      summary: Get organization users groups report
      description: >-
        Returns a report of all users in your organization with their group
        memberships. This endpoint returns all users without pagination and
        always includes group information. The report can be retrieved in JSON
        or CSV format by sending specific content-type headers.
      operationId: GetOrganizationUsersGroupsReport
      parameters:
        - name: Accept
          in: header
          description: >-
            Specify the response format. Use 'application/json' for JSON format
            or 'text/csv' for CSV format.
          required: false
          schema:
            type: string
            enum:
              - application/json
              - text/csv
            default: application/json
      responses:
        '200':
          $ref: '#/components/responses/UsersGroupsReportResponse'
        '401':
          $ref: '#/components/responses/UnauthenticatedResponse'
        '403':
          $ref: '#/components/responses/users_UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/users_NotFoundResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.organizations.users.getGroupsReport();

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.organizations.users.get_groups_report()
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Organizations.Users.GetGroupsReport(context.TODO(), telnyx.OrganizationUserGetGroupsReportParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.organizations.users.UserGetGroupsReportParams;

            import
            com.telnyx.sdk.models.organizations.users.UserGetGroupsReportResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    UserGetGroupsReportResponse response = client.organizations().users().getGroupsReport();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.organizations.users.get_groups_report

            puts(response)
        - lang: CLI
          source: |-
            telnyx organizations:users get-groups-report \
              --api-key 'My API Key'
components:
  responses:
    UsersGroupsReportResponse:
      description: >-
        Successful response with a list of organization users and their group
        memberships.
      content:
        application/json:
          schema:
            type: object
            title: Users Groups Report Response
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/OrganizationUserWithGroups'
          example:
            data:
              - id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
                record_type: organization_sub_user
                email: user@example.com
                user_status: enabled
                organization_user_bypasses_sso: false
                created_at: '2018-02-02T22:25:27.521Z'
                last_sign_in_at: '2018-02-02T22:25:27.521Z'
                groups:
                  - id: 7b09cdc3-8948-47f0-aa62-74ac943d6c59
                    name: Engineering
                  - id: 8c09cdc3-8948-47f0-aa62-74ac943d6c60
                    name: Sales
              - id: 9d09cdc3-8948-47f0-aa62-74ac943d6c61
                record_type: organization_owner
                email: owner@example.com
                user_status: enabled
                organization_user_bypasses_sso: false
                created_at: '2018-01-01T00:00:00.000Z'
                last_sign_in_at: '2018-02-02T22:25:27.521Z'
                groups: []
        text/csv:
          schema:
            type: string
            description: >-
              CSV formatted report of users and their groups. Columns: id,
              email, user_status, created_at, last_sign_in_at, groups
              (comma-separated list of group names).
          example: >-
            id,email,user_status,created_at,last_sign_in_at,groups

            6a09cdc3-8948-47f0-aa62-74ac943d6c58,user@example.com,enabled,2018-02-02T22:25:27.521Z,2018-02-02T22:25:27.521Z,"Engineering,
            Sales"
    UnauthenticatedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            Authentication Failed:
              value:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: Could not understand the provided credentials.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
    users_UnauthorizedResponse:
      description: >-
        The user doesn't have the required permissions to perform the requested
        action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            notAuthorized:
              value:
                errors:
                  - code: '10010'
                    title: Not authorized
                    detail: You are not authorized to access the requested resource.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10010
                    source:
                      pointer: /
    users_NotFoundResponse:
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            notFound:
              value:
                errors:
                  - code: '10005'
                    title: Resource not found
                    detail: The requested resource or URL could not be found.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10005
                    source:
                      pointer: /
  schemas:
    OrganizationUserWithGroups:
      type: object
      title: OrganizationUserWithGroups
      description: An organization user with their group memberships always included.
      properties:
        id:
          type: string
          description: Identifies the specific resource.
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          description: >-
            Identifies the type of the resource. Can be 'organization_owner' or
            'organization_sub_user'.
          example: organization_sub_user
        email:
          type: string
          format: email
          description: The email address of the user.
          example: user@example.com
        user_status:
          description: The status of the account.
          type: string
          enum:
            - enabled
            - disabled
            - blocked
          default: enabled
          example: enabled
        organization_user_bypasses_sso:
          type: boolean
          description: >-
            Indicates whether this user is allowed to bypass SSO and use
            password authentication.
          example: false
        created_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2018-02-02T22:25:27.521Z'
        last_sign_in_at:
          type:
            - string
            - 'null'
          description: >-
            ISO 8601 formatted date indicating when the resource last signed
            into the portal. Null if the user has never signed in.
          example: '2018-02-02T22:25:27.521Z'
        groups:
          type: array
          description: The groups the user belongs to.
          items:
            $ref: '#/components/schemas/UserGroupReference'
      required:
        - id
        - record_type
        - email
        - user_status
        - created_at
        - groups
      example:
        id: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type: organization_sub_user
        email: user@example.com
        user_status: enabled
        organization_user_bypasses_sso: false
        created_at: '2018-02-02T22:25:27.521Z'
        last_sign_in_at: '2018-02-02T22:25:27.521Z'
        groups:
          - id: 7b09cdc3-8948-47f0-aa62-74ac943d6c59
            name: Engineering
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              detail:
                type: string
              meta:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
              title:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
    UserGroupReference:
      type: object
      title: UserGroupReference
      description: A reference to a group that a user belongs to.
      properties:
        id:
          type: string
          description: The unique identifier of the group.
          example: 7b09cdc3-8948-47f0-aa62-74ac943d6c59
        name:
          type: string
          description: The name of the group.
          example: Engineering
      required:
        - id
        - name
      example:
        id: 7b09cdc3-8948-47f0-aa62-74ac943d6c59
        name: Engineering
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````