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

# Retrieve the available login methods for a given username



## OpenAPI

````yaml /openapi.yaml get /login/methods
openapi: 3.0.3
info:
  title: Kardinal ARO API
  version: 2.55.0
  description: This document specifies the REST API of Kardinal ARO v2.
  contact:
    url: https://kardinal.ai/
    email: contact@kardinal.ai
servers:
  - url: /api/v2
security:
  - access_token: []
tags:
  - name: Authenticate
    description: How to authenticate, and manage the access and refresh tokens.
  - name: Plan
    description: How to create, retrieve, update and delete plans.
  - name: Resource
    description: How to create, retrieve, update and delete resources in a plan.
  - name: Order
    description: How to create, retrieve, update and delete orders in a plan.
  - name: SimplePlan
    description: How to create a plan through the use of a simple plan.
paths:
  /login/methods:
    get:
      tags:
        - Authenticate
      summary: Retrieve the available login methods for a given username
      operationId: getLoginMethods
      parameters:
        - $ref: '#/components/parameters/username'
      responses:
        '200':
          description: Authentication methods collection response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopedAuthenticationMethods'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security: []
components:
  parameters:
    username:
      name: username
      description: The username.
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/Username'
  schemas:
    EnvelopedAuthenticationMethods:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AuthenticationMethods'
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    Username:
      type: string
      description: >-
        The username is used for login, it is unique for each user, it can be
        either an email (for clients) or a regular username (for Kardinal's
        internal users).
      example: martin.dupont@kardinal.ai
      oneOf:
        - $ref: '#/components/schemas/RegexNotEmpty'
        - $ref: '#/components/schemas/Email'
    AuthenticationMethods:
      type: array
      items:
        $ref: '#/components/schemas/AuthenticationMethod'
      example:
        - provider: azure
          properties:
            tenantId: 460498e4-4a40-48c1-884a-93deaddbc1a3
            clientId: 030b609a-e9cc-49bf-bedc-fbf846a4d8b6,
            scopes:
              - api://030b609a-e9cc-49bf-bedc-fbf846a4d8b6/UsersRead
          authUrl: /api/v2/login/sso/azure
        - provider: kardinal
          authUrl: /api/v2/login
    EnvelopedErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    RegexNotEmpty:
      type: string
      description: Not empty string.
      pattern: .+
    Email:
      type: string
      description: A valid email address.
      format: email
      example: martin.dupont@kardinal.ai
    AuthenticationMethod:
      type: object
      description: An authentication method to be used for login.
      properties:
        provider:
          type: string
          description: The name of the authentication provider.
        properties:
          type: object
          description: Additional properties needed by the authentication method.
        authUrl:
          type: string
          description: The absolute path of the login endpoint to use.
      required:
        - provider
        - authUrl
    Error:
      type: object
      readOnly: true
      properties:
        code:
          type: string
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        message:
          type: string
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        properties:
          $ref: '#/components/schemas/ErrorProperties'
      required:
        - message
        - code
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    ErrorProperties:
      type: object
      additionalProperties:
        type: string
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
  responses:
    BadRequest:
      description: >-
        The server could not understand the request due to invalid content (bad
        syntax, bad format, bad values, etc).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvelopedErrors'
    InternalServerError:
      description: An internal server error has occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvelopedErrors'
  securitySchemes:
    access_token:
      type: http
      scheme: bearer
      bearerFormat: JWT

````