Kiota · Authentication Profile

Kiota Authentication

Authentication

Kiota has no API of its own to authenticate against, so this profile covers the two authentication surfaces it genuinely publishes. (1) The CLI's own sign-in to private API description repositories — `kiota login github device` (GitHub device code) or a personal access token. (2) The authentication model Kiota builds INTO the clients it generates: a required authentication provider on the request adapter, a set of built-in providers, and an allowed-hosts validator that keeps a token from being attached to an off-allowlist host. The second is the more consequential one — it is the auth posture every Kiota-generated SDK in the world inherits.

Kiota secures its APIs with oauth2-device-code, apiKey, http-bearer, and anonymous across 6 declared security schemes, as derived from its OpenAPI definitions. OAuth 2.0 is offered via the deviceCode flow(s).

Code GenerationMicrosoftOpenAPISDKDeveloper ToolsAPI ClientOpen SourceCLIJSON SchemaSDK Generation
Methods: oauth2-device-code, apiKey, http-bearer, anonymous Schemes: 6 OAuth flows: deviceCode API key in: header, query

Security Schemes

kiota login github device oauth2-device-code
kiota login github pat personal-access-token
AnonymousAuthenticationProvider anonymous
ApiKeyAuthenticationProvider apiKey
· in: headerquery ()
BaseBearerTokenAuthenticationProvider http
scheme: bearer
Microsoft Entra Identity authentication provider oauth2

Source

Authentication Profile

kiota-authentication.yml Raw ↑
generated: '2026-08-06'
method: searched
source: https://learn.microsoft.com/en-us/openapi/kiota/authentication and https://github.com/microsoft/kiota/blob/main/specs/cli/login.md
docs: https://learn.microsoft.com/en-us/openapi/kiota/authentication
description: 'Kiota has no API of its own to authenticate against, so this profile covers the two authentication surfaces it genuinely publishes. (1) The CLI''s own sign-in to private API description repositories
  — `kiota login github device` (GitHub device code) or a personal access token. (2) The authentication model Kiota builds INTO the clients it generates: a required authentication provider on the request
  adapter, a set of built-in providers, and an allowed-hosts validator that keeps a token from being attached to an off-allowlist host. The second is the more consequential one — it is the auth posture
  every Kiota-generated SDK in the world inherits.'
scope: cli-and-generated-clients
summary:
  types:
  - oauth2-device-code
  - apiKey
  - http-bearer
  - anonymous
  api_key_in:
  - header
  - query
  oauth2_flows:
  - deviceCode
  design_note: Kiota deliberately requires the authentication provider as a constructor parameter on the request adapter rather than as an HTTP middleware handler, to force the application developer to
    make a conscious choice about how the API is authenticated.
cli_authentication:
  command: kiota login
  purpose: Sign in to private repositories so search, show and generate can reach private API descriptions. `kiota logout` clears it.
  providers:
  - search_provider: github
    strategies:
    - id: device
      type: oauth2-device-code
      usage: kiota login github device
    - id: pat
      type: personal-access-token
      usage: kiota login github pat --pat <value>
      note: The PAT value is explicitly excluded from telemetry.
  spec: https://github.com/microsoft/kiota/blob/main/specs/cli/login.md
generated_client_authentication:
  interfaces:
  - name: AuthenticationProvider
    library: kiota abstractions
    contract: authenticateRequest(request, additionalAuthenticationContext) — completes when the request object has been updated with authentication/authorization information. Implemented per language (IAuthenticationProvider
      in .NET).
  - name: AccessTokenProvider
    library: kiota abstractions
    contract: getAuthorizationToken(uri, additionalAuthenticationContext) returns the access token for the request URI, or null when the request should not be authenticated; also exposes getAllowedHostsValidator().
  providers:
  - name: AnonymousAuthenticationProvider
    type: anonymous
    description: Placeholder that performs no operation, for APIs that require no authentication.
  - name: ApiKeyAuthenticationProvider
    type: apiKey
    in: &id001
    - header
    - query
    description: Sets a named request header or query parameter to a supplied value. Performs no encoding of the key or value — basic auth callers must base64-encode "userId:password" before passing it
      in.
  - name: BaseBearerTokenAuthenticationProvider
    type: http
    scheme: bearer
    description: Composes the Authorization bearer header from an AccessTokenProvider implementation, so a new auth scheme only has to implement token acquisition, not header composition.
  - name: Microsoft Entra Identity authentication provider
    type: oauth2
    package: kiota authentication azure (Microsoft.Kiota.Authentication.Azure / microsoft-kiota-authentication-azure)
    description: Acquires access tokens from Microsoft Entra Identity and implements bearer authentication; usable for any API secured by the Microsoft Entra Identity Platform.
  selection_guidance:
  - condition: API requires no authentication
    use: AnonymousAuthenticationProvider
  - condition: API is protected by Microsoft Identity Platform
    use: Microsoft Entra Identity authentication provider
  - condition: API uses an API key in a header or query parameter
    use: ApiKeyAuthenticationProvider
  - condition: API uses a bearer token in the Authorization header
    use: Custom AccessTokenProvider with BaseBearerTokenAuthenticationProvider
  - condition: Anything else
    use: Custom AuthenticationProvider
  security_controls:
  - name: AllowedHostsValidator
    description: Validates the host of every request against an allowlist before the access token provider returns a token. This is the control that stops a redirect or a hostile server in a description
      from harvesting a caller's credential.
  - name: --allowed-external-origins
    added_in: 1.32.5
    description: External $refs in an OpenAPI description are no longer resolved by default; this parameter opts specific origins, URIs, patterns or paths back in.
x-evidence:
  fetched: '2026-08-06'
  probes:
  - url: https://learn.microsoft.com/en-us/openapi/kiota/authentication
    status: 200
  - url: https://raw.githubusercontent.com/microsoft/kiota/main/specs/cli/login.md
    status: 200
schemes:
- name: kiota login github device
  type: oauth2-device-code
  surface: cli
  usage: kiota login github device
- name: kiota login github pat
  type: personal-access-token
  surface: cli
  usage: kiota login github pat --pat <value>
- name: AnonymousAuthenticationProvider
  type: anonymous
  surface: generated-client
- name: ApiKeyAuthenticationProvider
  type: apiKey
  surface: generated-client
  in: *id001
- name: BaseBearerTokenAuthenticationProvider
  type: http
  surface: generated-client
  scheme: bearer
- name: Microsoft Entra Identity authentication provider
  type: oauth2
  surface: generated-client

Work with this as data

Every security artifact here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for security posture

4 MCP tools reach this
  • find_securityBrowse and filter every security artifact in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This security artifact
curl "https://apis.io/api/v1/security/kiota-authentication"
All security posture
curl "https://apis.io/api/v1/security?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.