> ## 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`).

## Autorizzazioni

Richiede un [utente di servizio](https://docs.devinenterprise.com/it/api-reference/v3/service-users/members-service-users.md) o un [token di accesso personale](https://docs.devinenterprise.com/it/api-reference/personal-access-tokens.md) 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/EnterpriseUserWithIdpRoles'
          description: Risposta con esito positivo
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Non autorizzato
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Proibito
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Non trovato
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflitto
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Contenuto non elaborabile
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Troppe richieste
components:
  schemas:
    EnterpriseUserWithIdpRoles:
      properties:
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        enterprise_joined_at:
          anyOf:
            - type: integer
            - type: 'null'
          description: Quando l'utente è stato aggiunto a questa Enterprise.
          title: Enterprise Joined At
        idp_identities:
          anyOf:
            - items:
                $ref: '#/components/schemas/IdpIdentity'
              type: array
            - type: 'null'
          description: >-
            Le identità dell'utente associate alle connessioni SSO dell'azienda.
            Restituite solo se la funzionalità è abilitata per l'azienda.
          title: Idp Identities
        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: EnterpriseUserWithIdpRoles
      type: object
    ProblemDetail:
      description: >-
        Corpo dell'errore application/problem+json RFC 9457 per l'API v3.


        detail è mantenuto dal corpo legacy {"detail": ...} per
        retrocompatibilità; gli

        altri membri sono aggiuntivi. errors contiene gli errori di validazione
        a livello di campo

        (solo 422).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Una spiegazione leggibile dall'utente, specifica per questa
            occorrenza.
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Codice elaborabile automaticamente che indica il rifiuto di
            un'azione bloccata (ad es. "user_frozen", "migrated_session").
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Errori di convalida a livello di campo (solo per le risposte 422).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Un riferimento URI (il percorso della richiesta) per questa
            occorrenza.
          title: Instance
        status:
          description: Il codice di stato HTTP.
          title: Status
          type: integer
        title:
          description: Un breve riepilogo del tipo di problema, leggibile dall'utente.
          title: Title
          type: string
        type:
          default: about:blank
          description: Un riferimento URI che identifica il tipo di problema.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    IdpIdentity:
      properties:
        connection_name:
          description: Nome della connessione SSO.
          title: Connection Name
          type: string
        subject:
          description: >-
            Identificatore del soggetto dell'utente presso il provider di
            identità della connessione (SAML NameID o OIDC `sub`).
          title: Subject
          type: string
      required:
        - connection_name
        - subject
      title: IdpIdentity
      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
    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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.