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

# GET utente

> Recupera un utente tramite ID. Restituisce sia le assegnazioni di ruolo dirette sia quelle derivate dai gruppi IDP.

Questo endpoint restituisce un utente in base all'ID, incluse sia le assegnazioni di ruolo dirette (`role_assignments`) sia le assegnazioni di ruolo derivate dai gruppi IDP (`idp_role_assignments`).

<div id="permissions">
  ## Autorizzazioni
</div>

Richiede un utente di servizio con l'autorizzazione `ViewAccountMembership` a livello Enterprise.


## OpenAPI

````yaml it/v3-openapi.yaml GET /v3/enterprise/members/users/{user_id}
openapi: 3.1.0
info:
  description: API Devin v3 con autenticazione utente di servizio e RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/members/users/{user_id}:
    get:
      tags:
        - users
      summary: GET utente
      description: >-
        Recupera un utente tramite ID. Restituisce sia le assegnazioni di ruolo
        dirette sia quelle derivate dai gruppi IDP.
      operationId: handle_get_enterprise_user_v3_enterprise_members_users__user_id__get
      parameters:
        - description: ID utente
          in: path
          name: user_id
          required: true
          schema:
            title: User Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserWithIdpRoles'
          description: Risposta con esito positivo
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Errore di validazione
components:
  schemas:
    UserWithIdpRoles:
      description: >-
        Utente con assegnazioni di ruolo sia dirette sia derivate dal gruppo
        IDP.
      properties:
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        idp_role_assignments:
          items:
            $ref: '#/components/schemas/IdpRoleAssignment'
          title: Idp Role Assignments
          type: array
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        role_assignments:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          title: Role Assignments
          type: array
        user_id:
          title: User Id
          type: string
      required:
        - user_id
        - email
        - name
        - role_assignments
      title: UserWithIdpRoles
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    IdpRoleAssignment:
      description: >-
        Un'assegnazione di ruolo ereditata tramite l'appartenenza a un gruppo
        IDP.
      properties:
        idp_group_name:
          title: Idp Group Name
          type: string
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        role:
          $ref: '#/components/schemas/Role'
      required:
        - role
        - idp_group_name
      title: IdpRoleAssignment
      type: object
    RoleAssignment:
      properties:
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        role:
          $ref: '#/components/schemas/Role'
      required:
        - role
      title: RoleAssignment
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    Role:
      properties:
        role_id:
          title: Role Id
          type: string
        role_name:
          title: Role Name
          type: string
        role_type:
          enum:
            - enterprise
            - org
          title: Role Type
          type: string
      required:
        - role_name
        - role_id
        - role_type
      title: Role
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Credenziale dell''utente del servizio (prefisso: cog_)'
      scheme: bearer
      type: http

````